---
title: Set Permission For Vault Group
slug: kron-pam-api-collection-3-9-0/set-permission-for-vault-group
docTags: 
createdAt: 2026-10-21T06:10:28.166Z
---

{
  "id": "36mmTToSpj-4mv1w2HwcL",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/setPermissionForGroup",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>Set the permissions for a Vault group by sending the <code>dbId</code> of the group. Permissions should be provided as <code>user group id: permission type</code>. The <code>applyType</code> determines the scope and can be one of the following: THIS_ONLY, ONE_LEVEL, FULL_TREE.</p>\n<ul>\n<li>\n<p><strong>dbId</strong>: ID of the Vault group.</p>\n</li>\n<li>\n<p><strong>newPermission</strong>: Array of permissions to be set, each with <code>id</code>, <code>permission</code>, and <code>type</code>.</p>\n</li>\n<li>\n<p><strong>applyType</strong>: Scope of the permissions.</p>\n<ul>\n<li>\n<p><strong>THIS_ONLY</strong>: Permissions are applied only to the specified Vault group.</p>\n</li>\n<li>\n<p><strong>ONE_LEVEL</strong>: Permissions are applied to the specified Vault group and its immediate child groups.</p>\n</li>\n<li>\n<p><strong>FULL_TREE</strong>: Permissions are applied to the specified Vault group and all of its descendant groups (child groups and all levels below).</p>\n</li>\n</ul>\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": "{\n    \"dbId\": 464347,\n    \"newPermission\": [\n        {\n            \"id\": \"c1ea6623-5951-4d11-bafa-302d858e129b\",\n            \"permission\": \"FULL_CONTROL\",\n            \"type\": \"USER_GROUP\"\n        },\n        {\n            \"id\": \"128829d6-63f4-4679-a0a7-d3b9cfc165cc\",\n            \"permission\": \"FULL_CONTROL\",\n            \"type\": \"USER_GROUP\"\n        }\n    ],\n    \"applyType\": \"ONE_LEVEL\"\n}",
          "value": "{\n    \"dbId\": 464347,\n    \"newPermission\": [\n        {\n            \"id\": \"c1ea6623-5951-4d11-bafa-302d858e129b\",\n            \"permission\": \"FULL_CONTROL\",\n            \"type\": \"USER_GROUP\"\n        },\n        {\n            \"id\": \"128829d6-63f4-4679-a0a7-d3b9cfc165cc\",\n            \"permission\": \"FULL_CONTROL\",\n            \"type\": \"USER_GROUP\"\n        }\n    ],\n    \"applyType\": \"ONE_LEVEL\"\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Set Permission For Vault Group",
        "jsonExample": "SUCCESS"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "uO3LJu9iCpUlAdJXbFfpj",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/setPermissionForGroup \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\n    \\\"dbId\\\": 464347,\\n    \\\"newPermission\\\": [\\n        {\\n            \\\"id\\\": \\\"c1ea6623-5951-4d11-bafa-302d858e129b\\\",\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\",\\n            \\\"type\\\": \\\"USER_GROUP\\\"\\n        },\\n        {\\n            \\\"id\\\": \\\"128829d6-63f4-4679-a0a7-d3b9cfc165cc\\\",\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\",\\n            \\\"type\\\": \\\"USER_GROUP\\\"\\n        }\\n    ],\\n    \\\"applyType\\\": \\\"ONE_LEVEL\\\"\\n}\"'"
        },
        {
          "id": "4u8PowKPpu9P_LKlJvWg0",
          "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    \\\"dbId\\\": 464347,\\n    \\\"newPermission\\\": [\\n        {\\n            \\\"id\\\": \\\"c1ea6623-5951-4d11-bafa-302d858e129b\\\",\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\",\\n            \\\"type\\\": \\\"USER_GROUP\\\"\\n        },\\n        {\\n            \\\"id\\\": \\\"128829d6-63f4-4679-a0a7-d3b9cfc165cc\\\",\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\",\\n            \\\"type\\\": \\\"USER_GROUP\\\"\\n        }\\n    ],\\n    \\\"applyType\\\": \\\"ONE_LEVEL\\\"\\n}\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sapm/setPermissionForGroup\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "CWG-_ArxAxjDkcnEPQKuT",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/setPermissionForGroup\")\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    \\\"dbId\\\": 464347,\\n    \\\"newPermission\\\": [\\n        {\\n            \\\"id\\\": \\\"c1ea6623-5951-4d11-bafa-302d858e129b\\\",\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\",\\n            \\\"type\\\": \\\"USER_GROUP\\\"\\n        },\\n        {\\n            \\\"id\\\": \\\"128829d6-63f4-4679-a0a7-d3b9cfc165cc\\\",\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\",\\n            \\\"type\\\": \\\"USER_GROUP\\\"\\n        }\\n    ],\\n    \\\"applyType\\\": \\\"ONE_LEVEL\\\"\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "0DnqJzg0Yxi7k9cXoSDWP",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/setPermissionForGroup\"\n\npayload = json.dumps(\"{\\n    \\\"dbId\\\": 464347,\\n    \\\"newPermission\\\": [\\n        {\\n            \\\"id\\\": \\\"c1ea6623-5951-4d11-bafa-302d858e129b\\\",\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\",\\n            \\\"type\\\": \\\"USER_GROUP\\\"\\n        },\\n        {\\n            \\\"id\\\": \\\"128829d6-63f4-4679-a0a7-d3b9cfc165cc\\\",\\n            \\\"permission\\\": \\\"FULL_CONTROL\\\",\\n            \\\"type\\\": \\\"USER_GROUP\\\"\\n        }\\n    ],\\n    \\\"applyType\\\": \\\"ONE_LEVEL\\\"\\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": "uO3LJu9iCpUlAdJXbFfpj"
    },
    "results": {
      "languages": [
        {
          "id": "YBT_YwHoNiNyprjwnkhWZ",
          "language": "200",
          "code": "SUCCESS"
        }
      ],
      "selectedLanguageId": "YBT_YwHoNiNyprjwnkhWZ"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}