Skip to content

Instantly share code, notes, and snippets.

@infamousjoeg
Last active August 9, 2017 02:36
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/4c63464f5ee3a81a93c8aefe66d56df9 to your computer and use it in GitHub Desktop.
Save infamousjoeg/4c63464f5ee3a81a93c8aefe66d56df9 to your computer and use it in GitHub Desktop.
AIM CCP REST - Perl Example
#!/usr/bin/perl
use REST::Client;
my $client = REST::Client->new();
$client->addHeader('Content-Type', 'application/json');
$client->addHeader('cache-control', 'no-cache');
$baseURL = "https://pvwa.cyberark.local"
$appID = "RESTExamples";
$safe = "T-APP-CYBR-RESTAPI";
$folder = "Root";
$objectName = "Database-MicrosoftSQLServer-sql01.cyberark.local-Svc_BambooHR";
$url = "${baseURL}/AIMWebService/api/Accounts?AppID=${appID}&Safe=${safe}&Folder=${folder}&Object=${objectName}";
$client->GET($url);
$password = $client->responseContent();
print "The password is: ${password}";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment