---
title: List Device Group By Dbid With Devices
slug: kronpam-api-collection-350/list-device-group-by-dbid-with-devices
docTags: 
createdAt: 2024-07-22T09:58:47.220Z
---

{
  "id": "LeCvdctqBONFfxij9eJmc",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "{{url}}/aioc-rest-web/rest/discovery/getDeviceGroupByDbidWithDevices/DgDbID",
    "name": "",
    "description": "This method lists Device group with devices that are in the device group.\n\nEnter the DbID of chosen device group to \"DgDbID\" field in get url.",
    "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": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "getDeviceGroupByDbidWithDevices",
        "jsonExample": "{\n    \"dbId\": 107395,\n    \"id\": \"8851fead-2b5e-4769-b847-fc8a898999a0\",\n    \"name\": \"SSH\",\n    \"description\": null,\n    \"parentGroupId\": null,\n    \"ifaceOperationCheck\": false,\n    \"timeTolerance\": null,\n    \"realms\": [\n        107888\n    ],\n    \"deviceIds\": [\n        137963\n    ],\n    \"properties\": {\n        \"globalUsername\": \"root\",\n        \"globalPassword\": \"8k646jpc0XKY+gdetfj3jw==\"\n    },\n    \"children\": [],\n    \"devices\": [\n        {\n            \"dbId\": 137963,\n            \"id\": \"55ebb00a-8956-4db1-83f3-512dd5eb5749\",\n            \"name\": \"TestDevice\",\n            \"accessProtocol\": \"SSHv2\",\n            \"managementIp\": \"10.20.40.248\",\n            \"elementType\": {\n                \"dbId\": -1256593,\n                \"elementTypeId\": \"linux\",\n                \"elementTypeName\": \"Linux Server\",\n                \"vendor\": null,\n                \"category\": null,\n                \"elementTypeProperties\": [\n                    {\n                        \"dbId\": -316330256,\n                        \"elementTypePropertyValue\": \"-1\",\n                        \"elementTypePropertyKey\": \"shell.terminal.config.fixed_pty_columns\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -224107347,\n                        \"elementTypePropertyValue\": \".*?(&gt|\\\\$|#|%)\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.prompt_pattern\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -328318769,\n                        \"elementTypePropertyValue\": \".*(?i)password[:|&gt].*\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -328321729,\n                        \"elementTypePropertyValue\": \"^Enter the date.*\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -224107346,\n                        \"elementTypePropertyValue\": \"do_nothing\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.ctrl_z\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -328315408,\n                        \"elementTypePropertyValue\": \"^Quit.*\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -328317181,\n                        \"elementTypePropertyValue\": \"^Are you sure.*\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -224107345,\n                        \"elementTypePropertyValue\": \"abort\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.ctrl_c\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -355141703,\n                        \"elementTypePropertyValue\": \"^Select choice.*\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                        \"elementTypePropertyType\": null\n                    }\n                ]\n            },\n            \"discoveryTime\": 1549516266097,\n            \"properties\": {\n                \"pseudoDevice\": \"true\"\n            },\n            \"deviceGroups\": [\n                \"8851fead-2b5e-4769-b847-fc8a898999a0\"\n            ],\n            \"availability\": null,\n            \"currentMaintenanceWindow\": null,\n            \"interfaceName\": null,\n            \"nameManagementIp\": \"TestDevice-10.20.40.248\",\n            \"regionName\": null,\n            \"pseudoDevice\": true,\n            \"domainController\": null,\n            \"discoverySource\": null,\n            \"portNum\": null\n        }\n    ],\n    \"rootGroupId\": null,\n    \"globalUsername\": \"root\",\n    \"globalPassword\": \"8k646jpc0XKY+gdetfj3jw==\",\n    \"showInDeviceTree\": true,\n    \"useAsRoleGroup\": true,\n    \"discoverySources\": null,\n    \"readOnly\": false\n}"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "T2Z_oNoAACQv1zKgasutC",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url {{url}}/aioc-rest-web/rest/discovery/getDeviceGroupByDbidWithDevices/DgDbID \\\n     --header 'accept: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}'"
        },
        {
          "id": "YnUHD_mQ6h9b3DyrsgZrb",
          "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 requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/discovery/getDeviceGroupByDbidWithDevices/DgDbID\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "EpvNbS3Wci7Z2TKePDAwT",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/discovery/getDeviceGroupByDbidWithDevices/DgDbID\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "bK6Z-_nL2r6DUtRYGNkoi",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/discovery/getDeviceGroupByDbidWithDevices/DgDbID\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "T2Z_oNoAACQv1zKgasutC"
    },
    "results": {
      "languages": [
        {
          "id": "Eqcx5J2Sva5hdXPnwCPyC",
          "language": "200",
          "code": "{\n    \"dbId\": 107395,\n    \"id\": \"8851fead-2b5e-4769-b847-fc8a898999a0\",\n    \"name\": \"SSH\",\n    \"description\": null,\n    \"parentGroupId\": null,\n    \"ifaceOperationCheck\": false,\n    \"timeTolerance\": null,\n    \"realms\": [\n        107888\n    ],\n    \"deviceIds\": [\n        137963\n    ],\n    \"properties\": {\n        \"globalUsername\": \"root\",\n        \"globalPassword\": \"8k646jpc0XKY+gdetfj3jw==\"\n    },\n    \"children\": [],\n    \"devices\": [\n        {\n            \"dbId\": 137963,\n            \"id\": \"55ebb00a-8956-4db1-83f3-512dd5eb5749\",\n            \"name\": \"TestDevice\",\n            \"accessProtocol\": \"SSHv2\",\n            \"managementIp\": \"10.20.40.248\",\n            \"elementType\": {\n                \"dbId\": -1256593,\n                \"elementTypeId\": \"linux\",\n                \"elementTypeName\": \"Linux Server\",\n                \"vendor\": null,\n                \"category\": null,\n                \"elementTypeProperties\": [\n                    {\n                        \"dbId\": -316330256,\n                        \"elementTypePropertyValue\": \"-1\",\n                        \"elementTypePropertyKey\": \"shell.terminal.config.fixed_pty_columns\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -224107347,\n                        \"elementTypePropertyValue\": \".*?(&gt|\\\\$|#|%)\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.prompt_pattern\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -328318769,\n                        \"elementTypePropertyValue\": \".*(?i)password[:|&gt].*\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -328321729,\n                        \"elementTypePropertyValue\": \"^Enter the date.*\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -224107346,\n                        \"elementTypePropertyValue\": \"do_nothing\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.ctrl_z\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -328315408,\n                        \"elementTypePropertyValue\": \"^Quit.*\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -328317181,\n                        \"elementTypePropertyValue\": \"^Are you sure.*\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -224107345,\n                        \"elementTypePropertyValue\": \"abort\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.ctrl_c\",\n                        \"elementTypePropertyType\": null\n                    },\n                    {\n                        \"dbId\": -355141703,\n                        \"elementTypePropertyValue\": \"^Select choice.*\",\n                        \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.exc_last_line_patterns\",\n                        \"elementTypePropertyType\": null\n                    }\n                ]\n            },\n            \"discoveryTime\": 1549516266097,\n            \"properties\": {\n                \"pseudoDevice\": \"true\"\n            },\n            \"deviceGroups\": [\n                \"8851fead-2b5e-4769-b847-fc8a898999a0\"\n            ],\n            \"availability\": null,\n            \"currentMaintenanceWindow\": null,\n            \"interfaceName\": null,\n            \"nameManagementIp\": \"TestDevice-10.20.40.248\",\n            \"regionName\": null,\n            \"pseudoDevice\": true,\n            \"domainController\": null,\n            \"discoverySource\": null,\n            \"portNum\": null\n        }\n    ],\n    \"rootGroupId\": null,\n    \"globalUsername\": \"root\",\n    \"globalPassword\": \"8k646jpc0XKY+gdetfj3jw==\",\n    \"showInDeviceTree\": true,\n    \"useAsRoleGroup\": true,\n    \"discoverySources\": null,\n    \"readOnly\": false\n}"
        }
      ],
      "selectedLanguageId": "Eqcx5J2Sva5hdXPnwCPyC"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}