KRON PAM API Collection v3.5
Device Management
List Unassigned Devices
1 min
code examples curl location globoff '{{url}}/aioc rest web/rest/discovery/getunassigneddevices' \\ \ header 'accept application/json' \\ \ header 'content type 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/discovery/getunassigneddevices", 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/discovery/getunassigneddevices") 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/discovery/getunassigneddevices" 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" 138030, "id" "eed25b96 ff1b 4736 8402 6aeee88996f7", "name" "10 20 40 232", "accessprotocol" "sshv2", "managementip" "10 20 40 232", "elementtype" { "dbid" 1256593, "elementtypeid" "linux", "elementtypename" "linux server", "vendor" null, "category" null, "elementtypeproperties" \[ { "dbid" 224107347, "elementtypepropertyvalue" " ?(\>|\\\\$|#|%)", "elementtypepropertykey" "enforcer terminal behaviour prompt pattern", "elementtypepropertytype" null }, { "dbid" 224107345, "elementtypepropertyvalue" "abort", "elementtypepropertykey" "enforcer terminal behaviour ctrl c", "elementtypepropertytype" null }, { "dbid" 316330256, "elementtypepropertyvalue" " 1", "elementtypepropertykey" "shell terminal config fixed pty columns", "elementtypepropertytype" null }, { "dbid" 328315408, "elementtypepropertyvalue" "^quit ", "elementtypepropertykey" "enforcer terminal behaviour exc last line patterns", "elementtypepropertytype" null }, { "dbid" 328317181, "elementtypepropertyvalue" "^are you sure ", "elementtypepropertykey" "enforcer terminal behaviour exc last line patterns", "elementtypepropertytype" null }, { "dbid" 328321729, "elementtypepropertyvalue" "^enter the date ", "elementtypepropertykey" "enforcer terminal behaviour exc last line patterns", "elementtypepropertytype" null }, { "dbid" 328318769, "elementtypepropertyvalue" " (?i)password\[ |\>] ", "elementtypepropertykey" "enforcer terminal behaviour exc last line patterns", "elementtypepropertytype" null }, { "dbid" 224107346, "elementtypepropertyvalue" "do nothing", "elementtypepropertykey" "enforcer terminal behaviour ctrl z", "elementtypepropertytype" null }, { "dbid" 355141703, "elementtypepropertyvalue" "^select choice ", "elementtypepropertykey" "enforcer terminal behaviour exc last line patterns", "elementtypepropertytype" null } ] }, "discoverytime" 1549517480022, "properties" { "pseudodevice" "true" }, "devicegroups" \[], "availability" null, "currentmaintenancewindow" null, "interfacename" null, "namemanagementip" "10 20 40 232 10 20 40 232", "regionname" null, "pseudodevice" true, "domaincontroller" null, "discoverysource" null, "portnum" null } ]