---
title: Save New Device Group Subnet
slug: kron-pam-api-collection-381-patch3/save-new-device-group-subnet
docTags: 
createdAt: 2026-10-21T06:07:16.182Z
---

{
  "id": "HmS_y50TzG2qR8POsms1e",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/discovery/saveDeviceGroupSubnet",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This method adds a subnet to the Device group in KRON PAM.</p>\n<ul>\n<li>\n<p><strong>Instructions</strong>:</p>\n<ul>\n<li>\n<p>\"deviceGroupId\",\"subnetIp\",\"cidr\"</p>\n</li>\n<li>\n<p>These fields are necessary for defining the subnet that will be associated with the specified device group.</p>\n</li>\n</ul>\n</li>\n</ul>\n<p>This method is used to associate a new subnet with a device group by providing the required identifiers and network details.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "Content-Type",
          "description": "",
          "default": "application/json",
          "value": "application/json",
          "type": "string"
        },
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "{\n     \"dbId\": 462524,\n     \"deviceGroupId\": \"636dca2e-b185-4296-a66e-03b4a35dace2\",\n        \n        \"subnetIp\": \"10.30.40.1\",\n        \"mask\": null,\n        \"cidr\": 32,\n        \"firstIp\": 169748725,\n        \"lastIp\": 169748725,\n        \"interfaceName\": null\n\t\n}",
          "value": "{\n     \"dbId\": 462524,\n     \"deviceGroupId\": \"636dca2e-b185-4296-a66e-03b4a35dace2\",\n        \n        \"subnetIp\": \"10.30.40.1\",\n        \"mask\": null,\n        \"cidr\": 32,\n        \"firstIp\": 169748725,\n        \"lastIp\": 169748725,\n        \"interfaceName\": null\n\t\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "saveDeviceGroupSubnet",
        "jsonExample": "{\n    \"dbId\": 3483567,\n    \"deviceGroupId\": \"7dad2aa5-414a-4b20-86c0-346876ea88b5\",\n    \"subnetIp\": \"10.30.40.1\",\n    \"mask\": null,\n    \"cidr\": 32,\n    \"firstIp\": 169748481,\n    \"lastIp\": 169748481,\n    \"interfaceName\": \"null\"\n}"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "iwMPU8t0Ge94rZEYAbZOx",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/discovery/saveDeviceGroupSubnet \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\n     \\\"dbId\\\": 462524,\\n     \\\"deviceGroupId\\\": \\\"636dca2e-b185-4296-a66e-03b4a35dace2\\\",\\n        \\n        \\\"subnetIp\\\": \\\"10.30.40.1\\\",\\n        \\\"mask\\\": null,\\n        \\\"cidr\\\": 32,\\n        \\\"firstIp\\\": 169748725,\\n        \\\"lastIp\\\": 169748725,\\n        \\\"interfaceName\\\": null\\n\\t\\n}\"'"
        },
        {
          "id": "b1ct7kWDmTdC_MR_kTs0L",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar raw = JSON.stringify(\"{\\n     \\\"dbId\\\": 462524,\\n     \\\"deviceGroupId\\\": \\\"636dca2e-b185-4296-a66e-03b4a35dace2\\\",\\n        \\n        \\\"subnetIp\\\": \\\"10.30.40.1\\\",\\n        \\\"mask\\\": null,\\n        \\\"cidr\\\": 32,\\n        \\\"firstIp\\\": 169748725,\\n        \\\"lastIp\\\": 169748725,\\n        \\\"interfaceName\\\": null\\n\\t\\n}\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/discovery/saveDeviceGroupSubnet\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "M66ydemYAq94FiJdh6yi8",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/discovery/saveDeviceGroupSubnet\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"{\\n     \\\"dbId\\\": 462524,\\n     \\\"deviceGroupId\\\": \\\"636dca2e-b185-4296-a66e-03b4a35dace2\\\",\\n        \\n        \\\"subnetIp\\\": \\\"10.30.40.1\\\",\\n        \\\"mask\\\": null,\\n        \\\"cidr\\\": 32,\\n        \\\"firstIp\\\": 169748725,\\n        \\\"lastIp\\\": 169748725,\\n        \\\"interfaceName\\\": null\\n\\t\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "id6WjaGf63vh7og4qz1d5",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/discovery/saveDeviceGroupSubnet\"\n\npayload = json.dumps(\"{\\n     \\\"dbId\\\": 462524,\\n     \\\"deviceGroupId\\\": \\\"636dca2e-b185-4296-a66e-03b4a35dace2\\\",\\n        \\n        \\\"subnetIp\\\": \\\"10.30.40.1\\\",\\n        \\\"mask\\\": null,\\n        \\\"cidr\\\": 32,\\n        \\\"firstIp\\\": 169748725,\\n        \\\"lastIp\\\": 169748725,\\n        \\\"interfaceName\\\": null\\n\\t\\n}\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "iwMPU8t0Ge94rZEYAbZOx"
    },
    "results": {
      "languages": [
        {
          "id": "b6UiJ5kGPqfVDyHjW13L7",
          "language": "200",
          "code": "{\n    \"dbId\": 3483567,\n    \"deviceGroupId\": \"7dad2aa5-414a-4b20-86c0-346876ea88b5\",\n    \"subnetIp\": \"10.30.40.1\",\n    \"mask\": null,\n    \"cidr\": 32,\n    \"firstIp\": 169748481,\n    \"lastIp\": 169748481,\n    \"interfaceName\": \"null\"\n}"
        }
      ],
      "selectedLanguageId": "b6UiJ5kGPqfVDyHjW13L7"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}