---
title: Get Policy Keys by Element Type
slug: kron-pam-api-collection-381-patch3/get-policy-keys-by-element-type
docTags: 
createdAt: 2026-10-21T06:07:16.182Z
---

{
  "id": "-7Z5Civ9wmKe1v4RoznA8",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "{{url}}/aioc-rest-web/rest/policy/getPolicyKeysByElementTypeId/{{elementTypeId}}",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This API retrieves policy keys applicable to the specified element type using the element type ID in the request URL.</p>\n<ul>\n<li><strong>element type ID</strong>: The ID of the element type used to search for policy keys.</li>\n</ul>",
    "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": "elementTypeId",
          "description": "",
          "default": "elementTypeId",
          "value": "elementTypeId",
          "type": "string"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "List Policy Keys by Element Type",
        "jsonExample": "[\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        \"dbId\": 377572,\n        \"userCreate\": \"admin\",\n        \"userUpdate\": null,\n        \"creationDate\": 1581608151289,\n        \"lastUpdate\": null,\n        \"key\": \"date\",\n        \"description\": null,\n        \"userBehaviorRate\": null,\n        \"type\": \"BLACK\",\n        \"deviceTypes\": [\n            \"linux\"\n        ],\n        \"taskName\": null,\n        \"xmlContent\": null\n    }\n]"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "-dkthFlFNFQZ1iqXp6fJF",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url {{url}}/aioc-rest-web/rest/policy/getPolicyKeysByElementTypeId/{{elementTypeId}} \\\n     --header 'accept: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}'"
        },
        {
          "id": "9RB0Xkgu5p0vANp44sBih",
          "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/getPolicyKeysByElementTypeId/{{elementTypeId}}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "dD__T4WpZ8onj6Yrd6LBj",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/policy/getPolicyKeysByElementTypeId/{{elementTypeId}}\")\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": "I7jUg4pQJg9JvtnWQRTns",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/policy/getPolicyKeysByElementTypeId/{{elementTypeId}}\"\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": "-dkthFlFNFQZ1iqXp6fJF"
    },
    "results": {
      "languages": [
        {
          "id": "Uc0y9rLVYrkYEJri1_I5w",
          "language": "200",
          "code": "[\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        \"dbId\": 377572,\n        \"userCreate\": \"admin\",\n        \"userUpdate\": null,\n        \"creationDate\": 1581608151289,\n        \"lastUpdate\": null,\n        \"key\": \"date\",\n        \"description\": null,\n        \"userBehaviorRate\": null,\n        \"type\": \"BLACK\",\n        \"deviceTypes\": [\n            \"linux\"\n        ],\n        \"taskName\": null,\n        \"xmlContent\": null\n    }\n]"
        }
      ],
      "selectedLanguageId": "Uc0y9rLVYrkYEJri1_I5w"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}