---
title: Add Escalated Approval Managers For Sapm Group
slug: kron-pam-api-collection-340/add-escalated-approval-managers-for-sapm-group
docTags: 
createdAt: 2024-07-12T13:38:00.279Z
---

{
  "id": "aQ6vqLE4GfbTdmJlQrSgC",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmGroup",
    "name": "",
    "description": "<h3>Overview</h3>\n<p>This API endpoint facilitates the configuration of approval managers for a specific SAPM group within KRON PAM. By inputting the <code>dbId</code> of the SAPM group, users can designate which user groups are escalated to managerial approval rights for this particular SAPM group.</p>\n<h3>Usage</h3>\n<p>To set or modify the list of approval managers for a SAPM group:</p>\n<ol>\n<li>Provide the necessary parameters in the request body.</li>\n</ol>\n<h3>Parameters</h3>\n<ul>\n<li><strong>dbId</strong>:\n<ul>\n<li>Denotes the unique database ID of the SAPM group in KRON PAM.</li>\n</ul>\n</li>\n<li><strong>newEscalatedManager</strong>:\n<ul>\n<li>Refers to the ID of the user group that's intended to be escalated to managerial rights for the designated SAPM group.</li>\n</ul>\n</li>\n<li><strong>applyType</strong>:\n<ul>\n<li>Description: Specifies the extent of the managerial escalation.</li>\n<li>Possible Values:\n<ul>\n<li><code>THIS_ONLY</code>: Escalation is applied solely to the indicated SAPM group.</li>\n<li><code>ONE_LEVEL</code>: Escalation is applied to the designated SAPM group and its direct sub-groups.</li>\n<li><code>FULL_TREE</code>: Escalation is extended to the entire hierarchy or tree of the specified SAPM group.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><strong>managerDbId</strong>:\n<ul>\n<li>Description: Similar to <code>sapmManagerDbId</code>, this parameter signifies the ID of the original manager from which the escalation originates. It typically represents the main manager of the SAPM group. However, due to enhanced security protocols, this manager can be escalated.</li>\n</ul>\n</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"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "{\n    \"dbId\": 384793,\n    \"newEscalatedManager\": \"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\",\n    \"approvalLevel\": 2,\n    \"managerDbId\": 415146,\n    \"applyType\": \"THIS_ONLY\"\n}",
          "value": "{\n    \"dbId\": 384793,\n    \"newEscalatedManager\": \"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\",\n    \"approvalLevel\": 2,\n    \"managerDbId\": 415146,\n    \"applyType\": \"THIS_ONLY\"\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Add Escalated Approval Managers For Sapm Group",
        "jsonExample": "{\n    \"dbId\": 384793,\n    \"id\": \"d3535aa7-eb10-4e3a-8dc8-322c96b19beb\",\n    \"name\": \"SSH SAPM GROUP\",\n    \"description\": null,\n    \"parentSapmGroupId\": null,\n    \"permissions\": [\n        {\n            \"id\": \"dbae236b-90b5-4b7b-9696-ab85df33766e\",\n            \"eid\": null,\n            \"permission\": \"FULL_CONTROL\",\n            \"type\": \"USER_GROUP\"\n        },\n        {\n            \"id\": \"757b08a2-3e04-458c-8cd8-49084df3a37a\",\n            \"eid\": null,\n            \"permission\": \"READ_ONLY\",\n            \"type\": \"USER_GROUP\"\n        }\n    ],\n    \"owner\": {\n        \"id\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n        \"eid\": \"admin\"\n    },\n    \"userPermissionLevel\": 6,\n    \"approvalStatus\": null,\n    \"fullPath\": \"/SSH SAPM GROUP\",\n    \"createdAt\": 1694613811832,\n    \"updatedAt\": 1694777940108\n}"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "mpBZopQiXFiPzO30FUTy8",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmGroup \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\n    \\\"dbId\\\": 384793,\\n    \\\"newEscalatedManager\\\": \\\"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\\\",\\n    \\\"approvalLevel\\\": 2,\\n    \\\"managerDbId\\\": 415146,\\n    \\\"applyType\\\": \\\"THIS_ONLY\\\"\\n}\"'"
        },
        {
          "id": "-yvzJqsc0PH7uHkdI8sHq",
          "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\\\": 384793,\\n    \\\"newEscalatedManager\\\": \\\"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\\\",\\n    \\\"approvalLevel\\\": 2,\\n    \\\"managerDbId\\\": 415146,\\n    \\\"applyType\\\": \\\"THIS_ONLY\\\"\\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/addEscalatedManagersForSapmGroup\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "GeGToSXTGM3ApRqHVfZRp",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmGroup\")\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\\\": 384793,\\n    \\\"newEscalatedManager\\\": \\\"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\\\",\\n    \\\"approvalLevel\\\": 2,\\n    \\\"managerDbId\\\": 415146,\\n    \\\"applyType\\\": \\\"THIS_ONLY\\\"\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "mnoc2-L9mF2cWftoWQMU-",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmGroup\"\n\npayload = json.dumps(\"{\\n    \\\"dbId\\\": 384793,\\n    \\\"newEscalatedManager\\\": \\\"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\\\",\\n    \\\"approvalLevel\\\": 2,\\n    \\\"managerDbId\\\": 415146,\\n    \\\"applyType\\\": \\\"THIS_ONLY\\\"\\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": "mpBZopQiXFiPzO30FUTy8"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n    \"dbId\": 384793,\n    \"id\": \"d3535aa7-eb10-4e3a-8dc8-322c96b19beb\",\n    \"name\": \"SSH SAPM GROUP\",\n    \"description\": null,\n    \"parentSapmGroupId\": null,\n    \"permissions\": [\n        {\n            \"id\": \"dbae236b-90b5-4b7b-9696-ab85df33766e\",\n            \"eid\": null,\n            \"permission\": \"FULL_CONTROL\",\n            \"type\": \"USER_GROUP\"\n        },\n        {\n            \"id\": \"757b08a2-3e04-458c-8cd8-49084df3a37a\",\n            \"eid\": null,\n            \"permission\": \"READ_ONLY\",\n            \"type\": \"USER_GROUP\"\n        }\n    ],\n    \"owner\": {\n        \"id\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n        \"eid\": \"admin\"\n    },\n    \"userPermissionLevel\": 6,\n    \"approvalStatus\": null,\n    \"fullPath\": \"/SSH SAPM GROUP\",\n    \"createdAt\": 1694613811832,\n    \"updatedAt\": 1694777940108\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}