---
title: Search Policy Group
slug: kron-pam-api-collection-340/search-policy-group
docTags: 
createdAt: 2024-07-12T13:38:00.280Z
---

{
  "id": "5xh8thu_gSzO9GfzOQfh9",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/policy/searchPolicyGroup",
    "name": "",
    "description": "This method lists the policy group features if the name of the related policy group is sent in request body.",
    "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\t\"name\": \"PG_linux\"\n}",
          "value": "{\n\t\"name\": \"PG_linux\"\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Search Policy Group",
        "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": "EWEmuzUYJ86qn9ti6kT92",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/policy/searchPolicyGroup \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\n\\t\\\"name\\\": \\\"PG_linux\\\"\\n}\"'"
        },
        {
          "id": "HmwVjsrRmcBZPPYfgYbr9",
          "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\\t\\\"name\\\": \\\"PG_linux\\\"\\n}\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/policy/searchPolicyGroup\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "qlTi_j54ouQKJBxnSeJJl",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/policy/searchPolicyGroup\")\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\\t\\\"name\\\": \\\"PG_linux\\\"\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "MoabdqFYiZMo19VHw574I",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/policy/searchPolicyGroup\"\n\npayload = json.dumps(\"{\\n\\t\\\"name\\\": \\\"PG_linux\\\"\\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": "EWEmuzUYJ86qn9ti6kT92"
    },
    "results": {
      "languages": [
        {
          "id": "obgE_pmyXVLF0YdPJH065",
          "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": "obgE_pmyXVLF0YdPJH065"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}