---
title: Get Policy Group with Policy Keys by Policy Group DBID
slug: kron-pam-api-collection-381-patch3/get-policy-group-with-policy-keys-by-policy-group-dbid
docTags: 
createdAt: 2026-10-21T06:07:16.182Z
---

{
  "id": "v9eLVeBR_7S5nX4993Ml7",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "{{url}}/aioc-rest-web/rest/policy/getPolicyGroupByDbidWithPolicyKeys/{{policyGroupDbId}}",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This API retrieves policy groups and their associated policy keys using the provided policy group dbId in the request URL.</p>\n<ul>\n<li><strong>policy group dbId</strong>: The dbId of the policy group for which policy groups and policy keys will be listed.</li>\n</ul>\n<p>The response includes the policy groups and their policy keys corresponding to the specified dbId.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        },
        {
          "name": "policyGroupDbId",
          "description": "",
          "default": "policyGroupDbId",
          "value": "policyGroupDbId",
          "type": "string"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "List Policy Group with Policy Keys by Policy Group DBID",
        "jsonExample": "[\n    {\n        \"dbId\": 376256,\n        \"name\": \"PG_linux\",\n        \"description\": null,\n        \"policies\": [\n            {\n                \"dbId\": 376251,\n                \"userCreate\": \"admin\",\n                \"userUpdate\": null,\n                \"creationDate\": 1581605373075,\n                \"lastUpdate\": null,\n                \"key\": \".*\",\n                \"description\": null,\n                \"userBehaviorRate\": null,\n                \"type\": \"WHITE\",\n                \"deviceTypes\": [\n                    \"linux\"\n                ],\n                \"taskName\": null,\n                \"xmlContent\": null\n            }\n        ],\n        \"policyKeys\": [\n            {\n                \"dbId\": 376251,\n                \"userCreate\": \"admin\",\n                \"userUpdate\": null,\n                \"creationDate\": 1581605373075,\n                \"lastUpdate\": null,\n                \"key\": \".*\",\n                \"description\": null,\n                \"userBehaviorRate\": null,\n                \"type\": \"WHITE\",\n                \"deviceTypes\": [\n                    \"linux\"\n                ],\n                \"taskName\": null,\n                \"xmlContent\": null\n            }\n        ],\n        \"httpPolicies\": [],\n        \"maskingPolicies\": [],\n        \"timeRestrictions\": [],\n        \"realms\": [\n            376291\n        ],\n        \"sendEmail\": false,\n        \"sendSnmp\": false,\n        \"action\": \"GENERATE_ERROR\",\n        \"confirmationText\": null,\n        \"operationMode\": \"OPERATION\",\n        \"userCreate\": \"admin\",\n        \"userUpdate\": null,\n        \"creationDate\": 1581605384541,\n        \"lastUpdate\": null\n    }\n]"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "iSJR-m87k2dTsF40A66CG",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url {{url}}/aioc-rest-web/rest/policy/getPolicyGroupByDbidWithPolicyKeys/{{policyGroupDbId}} \\\n     --header 'accept: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}'"
        },
        {
          "id": "aCaqOQUJrjOVGA2tYEVGL",
          "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/policy/getPolicyGroupByDbidWithPolicyKeys/{{policyGroupDbId}}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "t6dQhhav9RW2qGB0Iyv5I",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/policy/getPolicyGroupByDbidWithPolicyKeys/{{policyGroupDbId}}\")\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": "BRBxlstosS13O_-900GF4",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/policy/getPolicyGroupByDbidWithPolicyKeys/{{policyGroupDbId}}\"\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": "iSJR-m87k2dTsF40A66CG"
    },
    "results": {
      "languages": [
        {
          "id": "DDM-UXBiTt41gD8NRHh3n",
          "language": "200",
          "code": "[\n    {\n        \"dbId\": 376256,\n        \"name\": \"PG_linux\",\n        \"description\": null,\n        \"policies\": [\n            {\n                \"dbId\": 376251,\n                \"userCreate\": \"admin\",\n                \"userUpdate\": null,\n                \"creationDate\": 1581605373075,\n                \"lastUpdate\": null,\n                \"key\": \".*\",\n                \"description\": null,\n                \"userBehaviorRate\": null,\n                \"type\": \"WHITE\",\n                \"deviceTypes\": [\n                    \"linux\"\n                ],\n                \"taskName\": null,\n                \"xmlContent\": null\n            }\n        ],\n        \"policyKeys\": [\n            {\n                \"dbId\": 376251,\n                \"userCreate\": \"admin\",\n                \"userUpdate\": null,\n                \"creationDate\": 1581605373075,\n                \"lastUpdate\": null,\n                \"key\": \".*\",\n                \"description\": null,\n                \"userBehaviorRate\": null,\n                \"type\": \"WHITE\",\n                \"deviceTypes\": [\n                    \"linux\"\n                ],\n                \"taskName\": null,\n                \"xmlContent\": null\n            }\n        ],\n        \"httpPolicies\": [],\n        \"maskingPolicies\": [],\n        \"timeRestrictions\": [],\n        \"realms\": [\n            376291\n        ],\n        \"sendEmail\": false,\n        \"sendSnmp\": false,\n        \"action\": \"GENERATE_ERROR\",\n        \"confirmationText\": null,\n        \"operationMode\": \"OPERATION\",\n        \"userCreate\": \"admin\",\n        \"userUpdate\": null,\n        \"creationDate\": 1581605384541,\n        \"lastUpdate\": null\n    }\n]"
        }
      ],
      "selectedLanguageId": "DDM-UXBiTt41gD8NRHh3n"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}