KRON PAM API Collection v3.5
Device Management
Delete Device Group Subnet
1 min
code examples curl location globoff request delete '{{url}}/aioc rest web/rest/discovery/deletedevicegroupsubnet' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x xsrf token {{csrftoken}}' \\ \ data '"{ \\"dbid\\" 3483567,\n \\"devicegroupid\\" \\"7dad2aa5 414a 4b20 86c0 346876ea88b5\\",\n \\"subnetip\\" \\"10 30 40 1\\",\n \\"mask\\" null,\n \\"cidr\\" 32,\n \\"firstip\\" 169093121,\n \\"lastip\\" 169093376,\n \\"interfacename\\" null\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("{ \\"dbid\\" 3483567,\n \\"devicegroupid\\" \\"7dad2aa5 414a 4b20 86c0 346876ea88b5\\",\n \\"subnetip\\" \\"10 30 40 1\\",\n \\"mask\\" null,\n \\"cidr\\" 32,\n \\"firstip\\" 169093121,\n \\"lastip\\" 169093376,\n \\"interfacename\\" null\n}"); var requestoptions = { method 'delete', headers myheaders, body raw, redirect 'follow' }; fetch("{{url}}/aioc rest web/rest/discovery/deletedevicegroupsubnet", 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/deletedevicegroupsubnet") 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("{ \\"dbid\\" 3483567,\n \\"devicegroupid\\" \\"7dad2aa5 414a 4b20 86c0 346876ea88b5\\",\n \\"subnetip\\" \\"10 30 40 1\\",\n \\"mask\\" null,\n \\"cidr\\" 32,\n \\"firstip\\" 169093121,\n \\"lastip\\" 169093376,\n \\"interfacename\\" null\n}") response = http request(request) puts response read body import requests import json url = "{{url}}/aioc rest web/rest/discovery/deletedevicegroupsubnet" payload = json dumps("{ \\"dbid\\" 3483567,\n \\"devicegroupid\\" \\"7dad2aa5 414a 4b20 86c0 346876ea88b5\\",\n \\"subnetip\\" \\"10 30 40 1\\",\n \\"mask\\" null,\n \\"cidr\\" 32,\n \\"firstip\\" 169093121,\n \\"lastip\\" 169093376,\n \\"interfacename\\" null\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 success