-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add options to get or list feature #227
Comments
@jgkloek Thanks for reaching out. I do not believe the list endpoint has the ability to scope down searching by specific fields like the ones you mentioned. You could always use the See the documentation below for information about how the search query parameter works. An example would be: cybr accounts list --search "<address> <safe> <platform-id> <username>" @infamousjoeg are my assumptions correct? |
Thank you very much. I did not know we could include multiple items in the search. I should have tried it. It works fine. I appreciate it.
I got my expected output and would like to ask one more question. I understand if it is not appropriate for this thread:
I’d like to get the id field in the output using jq. I’ve tried many different iterations but am just not able to wrangle it.
I know I can do it with sed, but jq is built specifically for handling json output. Would you please consider sharing the proper syntax?
Thank you again!
Jeffrey Kloek, President
Northeast Police Precinct Ambassadors
5139 Chiswood Cove
Memphis, TN 38134
901-386-5712 Home
901-233-6817 Cell
From: Andrew Copeland ***@***.***>
Sent: Friday, September 27, 2024 11:00 AM
To: infamousjoeg/cybr-cli ***@***.***>
Cc: jgkloek ***@***.***>; Mention ***@***.***>
Subject: Re: [infamousjoeg/cybr-cli] Add options to get or list feature (Issue #227)
@jgkloek <https://github.com/jgkloek> Thanks for reaching out. I do not believe the list endpoint has the ability to scope down searching by specific fields like the ones you mentioned.
You could always use the --search or -s feature flag and use spaces to include address safe platform-id and username.
See the documentation below for information about how the search query parameter works.
https://docs.cyberark.com/pam-self-hosted/Latest/en/Content/SDK/GetAccounts.htm?tocpath=Developer%7CREST%20APIs%7CAccounts%7C_____1#Filter
An example would be:
cybr accounts list --search "<address> <safe> <platform-id> <username>"
@infamousjoeg <https://github.com/infamousjoeg> are my assumptions correct?
—
Reply to this email directly, view it on GitHub <#227 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AVGHEPS3GXDEA4K67RGCQRLZYV6INAVCNFSM6AAAAABO7JQ6KOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZZGYYDONJWHE> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AVGHEPROZGFHW4PKISHCBYDZYV6INA5CNFSM6AAAAABO7JQ6KOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUN2XXBC.gif> Message ID: ***@***.*** ***@***.***> >
|
Actually I’m finding it works with comma separated values. I am still trying to get the id out using jq and trying
cybr accounts list –search “safeName,address,account” | jq -r ‘.id’
All I get back is
Null
I do get the expected content without the |jq -r ‘.id’
Thanks again
Jeffrey Kloek, President
Northeast Police Precinct Ambassadors
5139 Chiswood Cove
Memphis, TN 38134
901-386-5712 Home
901-233-6817 Cell
From: Jeff Kloek ***@***.***>
Sent: Friday, October 11, 2024 9:04 AM
To: 'infamousjoeg/cybr-cli' ***@***.***>; 'infamousjoeg/cybr-cli' ***@***.***>
Cc: 'Mention' ***@***.***>
Subject: RE: [infamousjoeg/cybr-cli] Add options to get or list feature (Issue #227)
Thank you very much. I did not know we could include multiple items in the search. I should have tried it. It works fine. I appreciate it.
I got my expected output and would like to ask one more question. I understand if it is not appropriate for this thread:
I’d like to get the id field in the output using jq. I’ve tried many different iterations but am just not able to wrangle it.
I know I can do it with sed, but jq is built specifically for handling json output. Would you please consider sharing the proper syntax?
Thank you again!
Jeffrey Kloek, President
Northeast Police Precinct Ambassadors
5139 Chiswood Cove
Memphis, TN 38134
901-386-5712 Home
901-233-6817 Cell
From: Andrew Copeland ***@***.*** ***@***.***> >
Sent: Friday, September 27, 2024 11:00 AM
To: infamousjoeg/cybr-cli ***@***.*** ***@***.***> >
Cc: jgkloek ***@***.*** ***@***.***> >; Mention ***@***.*** ***@***.***> >
Subject: Re: [infamousjoeg/cybr-cli] Add options to get or list feature (Issue #227)
@jgkloek <https://github.com/jgkloek> Thanks for reaching out. I do not believe the list endpoint has the ability to scope down searching by specific fields like the ones you mentioned.
You could always use the --search or -s feature flag and use spaces to include address safe platform-id and username.
See the documentation below for information about how the search query parameter works.
https://docs.cyberark.com/pam-self-hosted/Latest/en/Content/SDK/GetAccounts.htm?tocpath=Developer%7CREST%20APIs%7CAccounts%7C_____1#Filter
An example would be:
cybr accounts list --search "<address> <safe> <platform-id> <username>"
@infamousjoeg <https://github.com/infamousjoeg> are my assumptions correct?
—
Reply to this email directly, view it on GitHub <#227 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AVGHEPS3GXDEA4K67RGCQRLZYV6INAVCNFSM6AAAAABO7JQ6KOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZZGYYDONJWHE> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AVGHEPROZGFHW4PKISHCBYDZYV6INA5CNFSM6AAAAABO7JQ6KOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUN2XXBC.gif> Message ID: ***@***.*** ***@***.***> >
|
I finally got it:
Cybr accounts list - -search ‘username’ | jq -r .value[] | .id’
Thanks.
Jeffrey Kloek, President
Northeast Police Precinct Ambassadors
5139 Chiswood Cove
Memphis, TN 38134
901-386-5712 Home
901-233-6817 Cell
From: Jeff Kloek ***@***.***>
Sent: Friday, October 11, 2024 3:52 PM
To: 'infamousjoeg/cybr-cli' ***@***.***>; 'infamousjoeg/cybr-cli' ***@***.***>
Cc: 'Mention' ***@***.***>
Subject: RE: [infamousjoeg/cybr-cli] Add options to get or list feature (Issue #227)
Actually I’m finding it works with comma separated values. I am still trying to get the id out using jq and trying
cybr accounts list –search “safeName,address,account” | jq -r ‘.id’
All I get back is
Null
I do get the expected content without the |jq -r ‘.id’
Thanks again
Jeffrey Kloek, President
Northeast Police Precinct Ambassadors
5139 Chiswood Cove
Memphis, TN 38134
901-386-5712 Home
901-233-6817 Cell
From: Jeff Kloek ***@***.*** ***@***.***> >
Sent: Friday, October 11, 2024 9:04 AM
To: 'infamousjoeg/cybr-cli' ***@***.*** ***@***.***> >; 'infamousjoeg/cybr-cli' ***@***.*** ***@***.***> >
Cc: 'Mention' ***@***.*** ***@***.***> >
Subject: RE: [infamousjoeg/cybr-cli] Add options to get or list feature (Issue #227)
Thank you very much. I did not know we could include multiple items in the search. I should have tried it. It works fine. I appreciate it.
I got my expected output and would like to ask one more question. I understand if it is not appropriate for this thread:
I’d like to get the id field in the output using jq. I’ve tried many different iterations but am just not able to wrangle it.
I know I can do it with sed, but jq is built specifically for handling json output. Would you please consider sharing the proper syntax?
Thank you again!
Jeffrey Kloek, President
Northeast Police Precinct Ambassadors
5139 Chiswood Cove
Memphis, TN 38134
901-386-5712 Home
901-233-6817 Cell
From: Andrew Copeland ***@***.*** ***@***.***> >
Sent: Friday, September 27, 2024 11:00 AM
To: infamousjoeg/cybr-cli ***@***.*** ***@***.***> >
Cc: jgkloek ***@***.*** ***@***.***> >; Mention ***@***.*** ***@***.***> >
Subject: Re: [infamousjoeg/cybr-cli] Add options to get or list feature (Issue #227)
@jgkloek <https://github.com/jgkloek> Thanks for reaching out. I do not believe the list endpoint has the ability to scope down searching by specific fields like the ones you mentioned.
You could always use the --search or -s feature flag and use spaces to include address safe platform-id and username.
See the documentation below for information about how the search query parameter works.
https://docs.cyberark.com/pam-self-hosted/Latest/en/Content/SDK/GetAccounts.htm?tocpath=Developer%7CREST%20APIs%7CAccounts%7C_____1#Filter
An example would be:
cybr accounts list --search "<address> <safe> <platform-id> <username>"
@infamousjoeg <https://github.com/infamousjoeg> are my assumptions correct?
—
Reply to this email directly, view it on GitHub <#227 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AVGHEPS3GXDEA4K67RGCQRLZYV6INAVCNFSM6AAAAABO7JQ6KOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZZGYYDONJWHE> .
You are receiving this because you were mentioned. <https://github.com/notifications/beacon/AVGHEPROZGFHW4PKISHCBYDZYV6INA5CNFSM6AAAAABO7JQ6KOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUN2XXBC.gif> Message ID: ***@***.*** ***@***.***> >
|
Please consider adding features similar to the add function to the list or get functions:
-a address string
-s safe string
-p platform-id string
-u username string
Thank you
The text was updated successfully, but these errors were encountered: