Created
October 18, 2017 15:05
-
-
Save infamousjoeg/cc60f2142739d8ec182074112ab7e9f6 to your computer and use it in GitHub Desktop.
AIM CCP REST Example in Node.js
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
var http = require("https"); | |
var options = { | |
"method": "GET", | |
"hostname": "pvwa.cyberark.local", | |
"port": "443", | |
"path": "/AIMWebService/api/Accounts?AppID=AIM-CCP-Test&Safe=T-APP-CYBR-RESTAPI-TESTADD1&Folder=Root&Object=Operating%20System-WinDomain-cyberark.local-Svc_CyberArkREST", | |
"headers": { | |
"content-type": "application/json", | |
"cache-control": "no-cache", | |
} | |
}; | |
var req = http.request(options, function (res) { | |
var chunks = []; | |
res.on("data", function (chunk) { | |
chunks.push(chunk); | |
}); | |
res.on("end", function () { | |
var body = Buffer.concat(chunks); | |
console.log(body.toString()); | |
}); | |
}); | |
req.end(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment