infamousjoeg
6/9/2017 - 8:19 PM

AIM CCP REST - Bash Example

AIM CCP REST - Bash Example

#!/bin/bash

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' \
  '$BASEURL/AIMWebService/api/Accounts?AppID=$APPID&Safe=$SAFE&Folder=$FOLDER&Object=$OBJECTNAME'

echo "The password is: ${PASSWORD}"