Created
June 9, 2017 21:17
-
-
Save infamousjoeg/67aa405bb04821e0bd7ec3bf2c95e229 to your computer and use it in GitHub Desktop.
AIM CCP REST - Korn Shell Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
BASEURL="https://pvwa.cyberark.local" | |
APPID="RESTExamples" | |
SAFE="T-APP-CYBR-RESTAPI" | |
FOLDER="Root" | |
OBJECTNAME="Database-MicrosoftSQLServer-sql01.cyberark.local-Svc_BambooHR" | |
PASSWORD = wget --quiet \ | |
--method GET \ | |
--header 'content-type: application/json' \ | |
--header 'cache-control: no-cache' \ | |
--output-document \ | |
- '$BASEURL/AIMWebService/api/Accounts?AppID=$APPID&Safe=$SAFE&Folder=$FOLDER&Object=$OBJECTNAME' | |
print "The password is: $PASSWORD" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment