Skip to content

Instantly share code, notes, and snippets.

@infamousjoeg
Created June 9, 2017 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infamousjoeg/67aa405bb04821e0bd7ec3bf2c95e229 to your computer and use it in GitHub Desktop.
Save infamousjoeg/67aa405bb04821e0bd7ec3bf2c95e229 to your computer and use it in GitHub Desktop.
AIM CCP REST - Korn Shell Example
#!/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