Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@infamousjoeg
Created October 18, 2017 15:05
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/cc60f2142739d8ec182074112ab7e9f6 to your computer and use it in GitHub Desktop.
Save infamousjoeg/cc60f2142739d8ec182074112ab7e9f6 to your computer and use it in GitHub Desktop.
AIM CCP REST Example in Node.js
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