---
title: Save Policy Group
slug: kron-pam-api-collection-3-9-0/save-policy-group
docTags: 
createdAt: 2026-10-21T06:10:28.166Z
---

{
  "id": "6Qdxcv7Lt1NO5bvLNGqVW",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/policy/savePolicyKeyGroup",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This API creates a new policy group using the features provided in the request body.</p>\n<ul>\n<li><strong>Request body</strong>: Contains details for the new policy group.</li>\n</ul>\n<p>The response includes the following fields:</p>\n<ul>\n<li>\n<p><strong>dbId</strong>: Unique identifier for the policy group.</p>\n</li>\n<li>\n<p><strong>name</strong>: The name of the policy group.</p>\n</li>\n<li>\n<p><strong>description</strong>: A description of the policy group.</p>\n</li>\n<li>\n<p><strong>policies</strong>: Array of policies associated with the group.</p>\n</li>\n<li>\n<p><strong>policyKeys</strong>: Array of policy keys associated with the group.</p>\n</li>\n<li>\n<p><strong>httpPolicies</strong>: Array of HTTP policies associated with the group.</p>\n</li>\n<li>\n<p><strong>maskingPolicies</strong>: Array of masking policies associated with the group.</p>\n</li>\n<li>\n<p><strong>timeRestrictions</strong>: Array of time restrictions applied to the group.</p>\n</li>\n<li>\n<p><strong>realms</strong>: Realms associated with the group (null if not applicable).</p>\n</li>\n<li>\n<p><strong>sendEmail</strong>: Boolean indicating whether email notifications are enabled.</p>\n</li>\n<li>\n<p><strong>sendSnmp</strong>: Boolean indicating whether SNMP notifications are enabled.</p>\n</li>\n<li>\n<p><strong>action</strong>: Action to be performed by the policy group, such as generating an error.</p>\n</li>\n<li>\n<p><strong>confirmationText</strong>: Optional text used for confirmation messages.</p>\n</li>\n<li>\n<p><strong>operationMode</strong>: The mode of operation for the policy group, such as \"OPERATION\".</p>\n</li>\n<li>\n<p><strong>userCreate</strong>: User who created the policy group.</p>\n</li>\n<li>\n<p><strong>userUpdate</strong>: User who last updated the policy group (null if not updated).</p>\n</li>\n<li>\n<p><strong>creationDate</strong>: Timestamp when the policy group was created (null if not set).</p>\n</li>\n<li>\n<p><strong>lastUpdate</strong>: Timestamp when the policy group was last updated (null if not set).</p>\n</li>\n</ul>",
    "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": " {\r\n        \"dbId\": 19934,\r\n        \"name\": \"pg_ex\",\r\n        \"description\": \"p_api\",\r\n        \"httpPolicies\": [],\r\n        \"maskingPolicies\": [],\r\n        \"timeRestrictions\": [],\r\n        \"sendEmail\": false,\r\n        \"sendSnmp\": false,\r\n        \"action\": \"GENERATE_ERROR\",\r\n        \"confirmationText\": null,\r\n        \"operationMode\": \"OPERATION\",\r\n        \"userCreate\": null\r\n    }",
          "value": " {\r\n        \"dbId\": 19934,\r\n        \"name\": \"pg_ex\",\r\n        \"description\": \"p_api\",\r\n        \"httpPolicies\": [],\r\n        \"maskingPolicies\": [],\r\n        \"timeRestrictions\": [],\r\n        \"sendEmail\": false,\r\n        \"sendSnmp\": false,\r\n        \"action\": \"GENERATE_ERROR\",\r\n        \"confirmationText\": null,\r\n        \"operationMode\": \"OPERATION\",\r\n        \"userCreate\": null\r\n    }",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Create Policy Group",
        "jsonExample": "{\n    \"dbId\": 406596,\n    \"name\": \"pg_ex\",\n    \"description\": \"p_api\",\n    \"policies\": [],\n    \"policyKeys\": [],\n    \"httpPolicies\": [],\n    \"maskingPolicies\": [],\n    \"timeRestrictions\": [],\n    \"realms\": null,\n    \"sendEmail\": false,\n    \"sendSnmp\": false,\n    \"action\": \"GENERATE_ERROR\",\n    \"confirmationText\": null,\n    \"operationMode\": \"OPERATION\",\n    \"userCreate\": null,\n    \"userUpdate\": null,\n    \"creationDate\": null,\n    \"lastUpdate\": null\n}"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "peysDP5QkM1tIt9nA_iMY",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/policy/savePolicyKeyGroup \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\" {\\r\\n        \\\"dbId\\\": 19934,\\r\\n        \\\"name\\\": \\\"pg_ex\\\",\\r\\n        \\\"description\\\": \\\"p_api\\\",\\r\\n        \\\"httpPolicies\\\": [],\\r\\n        \\\"maskingPolicies\\\": [],\\r\\n        \\\"timeRestrictions\\\": [],\\r\\n        \\\"sendEmail\\\": false,\\r\\n        \\\"sendSnmp\\\": false,\\r\\n        \\\"action\\\": \\\"GENERATE_ERROR\\\",\\r\\n        \\\"confirmationText\\\": null,\\r\\n        \\\"operationMode\\\": \\\"OPERATION\\\",\\r\\n        \\\"userCreate\\\": null\\r\\n    }\"'"
        },
        {
          "id": "JSgF9MUaV3E1CqM8Su3Am",
          "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(\" {\\r\\n        \\\"dbId\\\": 19934,\\r\\n        \\\"name\\\": \\\"pg_ex\\\",\\r\\n        \\\"description\\\": \\\"p_api\\\",\\r\\n        \\\"httpPolicies\\\": [],\\r\\n        \\\"maskingPolicies\\\": [],\\r\\n        \\\"timeRestrictions\\\": [],\\r\\n        \\\"sendEmail\\\": false,\\r\\n        \\\"sendSnmp\\\": false,\\r\\n        \\\"action\\\": \\\"GENERATE_ERROR\\\",\\r\\n        \\\"confirmationText\\\": null,\\r\\n        \\\"operationMode\\\": \\\"OPERATION\\\",\\r\\n        \\\"userCreate\\\": null\\r\\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/savePolicyKeyGroup\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "luKJIXt47s8nAWq2L1otE",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/policy/savePolicyKeyGroup\")\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(\" {\\r\\n        \\\"dbId\\\": 19934,\\r\\n        \\\"name\\\": \\\"pg_ex\\\",\\r\\n        \\\"description\\\": \\\"p_api\\\",\\r\\n        \\\"httpPolicies\\\": [],\\r\\n        \\\"maskingPolicies\\\": [],\\r\\n        \\\"timeRestrictions\\\": [],\\r\\n        \\\"sendEmail\\\": false,\\r\\n        \\\"sendSnmp\\\": false,\\r\\n        \\\"action\\\": \\\"GENERATE_ERROR\\\",\\r\\n        \\\"confirmationText\\\": null,\\r\\n        \\\"operationMode\\\": \\\"OPERATION\\\",\\r\\n        \\\"userCreate\\\": null\\r\\n    }\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "FVs5jSvArVtKs-ccANT_i",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/policy/savePolicyKeyGroup\"\n\npayload = json.dumps(\" {\\r\\n        \\\"dbId\\\": 19934,\\r\\n        \\\"name\\\": \\\"pg_ex\\\",\\r\\n        \\\"description\\\": \\\"p_api\\\",\\r\\n        \\\"httpPolicies\\\": [],\\r\\n        \\\"maskingPolicies\\\": [],\\r\\n        \\\"timeRestrictions\\\": [],\\r\\n        \\\"sendEmail\\\": false,\\r\\n        \\\"sendSnmp\\\": false,\\r\\n        \\\"action\\\": \\\"GENERATE_ERROR\\\",\\r\\n        \\\"confirmationText\\\": null,\\r\\n        \\\"operationMode\\\": \\\"OPERATION\\\",\\r\\n        \\\"userCreate\\\": null\\r\\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": "peysDP5QkM1tIt9nA_iMY"
    },
    "results": {
      "languages": [
        {
          "id": "gScvxZejci-bmqfq8oPDf",
          "language": "200",
          "code": "{\n    \"dbId\": 406596,\n    \"name\": \"pg_ex\",\n    \"description\": \"p_api\",\n    \"policies\": [],\n    \"policyKeys\": [],\n    \"httpPolicies\": [],\n    \"maskingPolicies\": [],\n    \"timeRestrictions\": [],\n    \"realms\": null,\n    \"sendEmail\": false,\n    \"sendSnmp\": false,\n    \"action\": \"GENERATE_ERROR\",\n    \"confirmationText\": null,\n    \"operationMode\": \"OPERATION\",\n    \"userCreate\": null,\n    \"userUpdate\": null,\n    \"creationDate\": null,\n    \"lastUpdate\": null\n}"
        }
      ],
      "selectedLanguageId": "gScvxZejci-bmqfq8oPDf"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}