KRON PAM API Collection v3.4.0
Device Management
Delete Devices
1 min
code examples curl location globoff request delete '{{url}}/aioc rest web/rest/discovery/deletedevices' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x xsrf token {{csrftoken}}' \\ \ data '"\[\n\n {\n \t\\"dbid\\" \\"2862774\\",\n \\"id\\" \\"f7452550 a290 47ed b6fc 3b0f525dfc31\\",\n \\"managementip\\" \\"10 20 40 248\\"\n }\n]"'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x xsrf token", "{{csrftoken}}"); var raw = json stringify("\[\n\n {\n \t\\"dbid\\" \\"2862774\\",\n \\"id\\" \\"f7452550 a290 47ed b6fc 3b0f525dfc31\\",\n \\"managementip\\" \\"10 20 40 248\\"\n }\n]"); var requestoptions = { method 'delete', headers myheaders, body raw, redirect 'follow' }; fetch("{{url}}/aioc rest web/rest/discovery/deletedevices", 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/deletedevices") http = net http new(url host, url port); request = net http delete new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["x xsrf token"] = "{{csrftoken}}" request body = json dump("\[\n\n {\n \t\\"dbid\\" \\"2862774\\",\n \\"id\\" \\"f7452550 a290 47ed b6fc 3b0f525dfc31\\",\n \\"managementip\\" \\"10 20 40 248\\"\n }\n]") response = http request(request) puts response read body import requests import json url = "{{url}}/aioc rest web/rest/discovery/deletedevices" payload = json dumps("\[\n\n {\n \t\\"dbid\\" \\"2862774\\",\n \\"id\\" \\"f7452550 a290 47ed b6fc 3b0f525dfc31\\",\n \\"managementip\\" \\"10 20 40 248\\"\n }\n]") headers = { 'accept' 'application/json', 'content type' 'application/json', 'x xsrf token' '{{csrftoken}}' } response = requests request("delete", url, headers=headers, data=payload) print(response text) responses { "devicedbid 391662" "success" }{ "device id 5f92c11b 1d41 4c86 8ee2 f28dccc7f4c9" "success" }{ "management ip 10 20 40 248" "success" }