Get Policy Group with Policy Keys by Policy Group DBID
1 min
code examples curl request get \\ \ url {{url}}/aioc rest web/rest/policy/getpolicygroupbydbidwithpolicykeys/policygroupdbid \\ \ header 'accept application/json' \\ \ header 'x xsrf token {{csrftoken}}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x xsrf token", "{{csrftoken}}"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("{{url}}/aioc rest web/rest/policy/getpolicygroupbydbidwithpolicykeys/policygroupdbid", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("{{url}}/aioc rest web/rest/policy/getpolicygroupbydbidwithpolicykeys/policygroupdbid") http = net http new(url host, url port); request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["x xsrf token"] = "{{csrftoken}}" response = http request(request) puts response read body import requests import json url = "{{url}}/aioc rest web/rest/policy/getpolicygroupbydbidwithpolicykeys/policygroupdbid" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json', 'x xsrf token' '{{csrftoken}}' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses \[ { "dbid" 376256, "name" "pg linux", "description" null, "policies" \[ { "dbid" 376251, "usercreate" "admin", "userupdate" null, "creationdate" 1581605373075, "lastupdate" null, "key" " ", "description" null, "userbehaviorrate" null, "type" "white", "devicetypes" \[ "linux" ], "taskname" null, "xmlcontent" null } ], "policykeys" \[ { "dbid" 376251, "usercreate" "admin", "userupdate" null, "creationdate" 1581605373075, "lastupdate" null, "key" " ", "description" null, "userbehaviorrate" null, "type" "white", "devicetypes" \[ "linux" ], "taskname" null, "xmlcontent" null } ], "httppolicies" \[], "maskingpolicies" \[], "timerestrictions" \[], "realms" \[ 376291 ], "sendemail" false, "sendsnmp" false, "action" "generate error", "confirmationtext" null, "operationmode" "operation", "usercreate" "admin", "userupdate" null, "creationdate" 1581605384541, "lastupdate" null } ]