Last active
August 9, 2017 02:36
-
-
Save infamousjoeg/4c63464f5ee3a81a93c8aefe66d56df9 to your computer and use it in GitHub Desktop.
AIM CCP REST - Perl 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
#!/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