---
title: Add Escalated Approval Managers For Vault Account
slug: kronpam-api-collection-350/add-escalated-approval-managers-for-vault-account
docTags: 
createdAt: 2024-07-22T09:58:47.223Z
---

{
  "id": "RhiVq8pTaUJN0Z8d8CoW1",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmAccount",
    "name": "",
    "description": "<h3>Overview</h3>\n<p>This API endpoint allows the configuration of approvers for a specific Vault account within KRON PAM. By supplying the <code>dbId</code> of the Vault account, users can designate which user groups are granted managerial approval rights for this account.</p>\n<h3>Usage</h3>\n<p>To set or modify the list of approvers:</p>\n<ol>\n<li>Provide the necessary parameters in the request body.</li>\n<li>If the <code>newEscalatedManagers</code> parameter is given an empty array, the associated user group will be removed from the list of managers for the specified Vault account.</li>\n</ol>\n<h3>Parameters</h3>\n<ul>\n<li><strong>sapmDbId</strong>:\n<ul>\n<li>Represents the unique database ID of the Vault account in KRON PAM.</li>\n</ul>\n</li>\n<li><strong>newEscalatedManagers</strong>:\n<ul>\n<li>An array that contains the IDs of user groups designated to act as managers for the given Vault account.</li>\n<li>It must be User Group ID</li>\n<li>Note: If an empty array is supplied, it will lead to the removal of the user group from the list of managers tied to that Vault account.</li>\n</ul>\n</li>\n<li><strong>sapmManagerDbId</strong>:\n<ul>\n<li>Denotes the ID of the original manager from which escalation originates. While it typically signifies the primary manager of the Vault account, escalated managers, due to enhanced security measures and multi-layered permission structures, are viewed as a level above standard managers.</li>\n<li>Note: The <code>sapmManagerDbId</code> highlights the foundational manager that has undergone escalation.</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    \"sapmDbId\": 384810,\n    \"newEscalatedManagers\": [\n\t\t\"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\"\n\t],\n    \"approvalLevel\": 1,\n    \"sapmManagerDbId\": 385224\n}",
          "value": "{\n    \"sapmDbId\": 384810,\n    \"newEscalatedManagers\": [\n\t\t\"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\"\n\t],\n    \"approvalLevel\": 1,\n    \"sapmManagerDbId\": 385224\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Add Escalated Approval Managers For Vault Account",
        "jsonExample": "{\n    \"dbId\": 384810,\n    \"device\": {\n        \"dbId\": 384676,\n        \"id\": \"d576e5d1-cf32-43e7-883e-64006cd09291\",\n        \"name\": \"Linux\",\n        \"accessProtocol\": \"SSHv2\",\n        \"managementIp\": \"10.20.40.77\"\n    },\n    \"secretName\": \"SSH SAPM\",\n    \"config\": {\n        \"configId\": -9077,\n        \"name\": \"Linux\",\n        \"description\": \"Linux\",\n        \"strategy\": \"SSH\",\n        \"staticSecretType\": \"OTHER\",\n        \"properties\": {\n            \"new.user.found.action\": \"LOG\",\n            \"username.parser\": \"(.*?) : (.*)\",\n            \"change.password.command.template\": \"passwd\\\\n${oldPassword}\\\\n${newPassword}\\\\n${newPassword}\\\\nlogout\",\n            \"user.list.command\": \"cut -d: -f1 /etc/passwd | xargs groups\"\n        },\n        \"exactMatch4Search\": false,\n        \"recordLimit4Search\": null,\n        \"duplicatedConfigId\": null\n    },\n    \"changePeriod\": 2880,\n    \"username\": \"efe\",\n    \"description\": null,\n    \"secretNotes\": null,\n    \"lastChangeTime\": 1694615160210,\n    \"nextChangeTime\": 1694787960210,\n    \"passwordSeenStatus\": \"UNSEEN\",\n    \"validationStatus\": \"VALID\",\n    \"masterAccountId\": null,\n    \"accountLevelProperties\": {},\n    \"permissions\": [\n        {\n            \"id\": \"f19ef6c4-bfa7-4743-b8e2-7c38cf5dd958\",\n            \"eid\": \"Group1\",\n            \"permission\": \"READ_ONLY\",\n            \"type\": \"USER_GROUP\"\n        }\n    ],\n    \"identicalSapmAccounts\": [],\n    \"parentSapmGroup\": {\n        \"dbId\": 384793,\n        \"id\": \"d3535aa7-eb10-4e3a-8dc8-322c96b19beb\",\n        \"name\": \"SSH SAPM GROUP\",\n        \"description\": null\n    },\n    \"secretType\": \"DYNAMIC\",\n    \"owner\": {\n        \"id\": \"8c49a580-7201-4a44-82bc-e20354560766\",\n        \"eid\": \"test_user3\"\n    },\n    \"createdAt\": 1694613892487,\n    \"updatedAt\": 1694616189840,\n    \"managers\": [\n        {\n            \"group\": {\n                \"id\": \"f88e37af-9922-45d3-a812-866e2e3571b2\",\n                \"eid\": \"Escalated\"\n            },\n            \"approvalLevel\": 1\n        }\n    ],\n    \"userPermissionLevel\": 6,\n    \"privateType\": \"YES\",\n    \"approvalStatus\": null,\n    \"escalatedManagers\": [\n        {\n            \"dbId\": 385410,\n            \"group\": {\n                \"id\": \"dbae236b-90b5-4b7b-9696-ab85df33766e\",\n                \"eid\": \"escalated2\"\n            },\n            \"approvalLevel\": 1\n        },\n        {\n            \"dbId\": 385346,\n            \"group\": {\n                \"id\": \"DEFAULT_GROUP_SYSYEM_ADMINS\",\n                \"eid\": \"System.admins\"\n            },\n            \"approvalLevel\": 1\n        },\n        {\n            \"dbId\": 385459,\n            \"group\": {\n                \"id\": \"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\",\n                \"eid\": \"escalated3\"\n            },\n            \"approvalLevel\": 1\n        }\n    ],\n    \"groupFullPath\": \"/SSH SAPM GROUP\",\n    \"approvedBy\": null,\n    \"approvedDate\": null,\n    \"approvalRequired\": false\n}"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "_bn-CMAAImrpPUJJbpup4",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmAccount \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\n    \\\"sapmDbId\\\": 384810,\\n    \\\"newEscalatedManagers\\\": [\\n\\t\\t\\\"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\\\"\\n\\t],\\n    \\\"approvalLevel\\\": 1,\\n    \\\"sapmManagerDbId\\\": 385224\\n}\"'"
        },
        {
          "id": "leAPdiSW7cLYt9yJiX0Mh",
          "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    \\\"sapmDbId\\\": 384810,\\n    \\\"newEscalatedManagers\\\": [\\n\\t\\t\\\"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\\\"\\n\\t],\\n    \\\"approvalLevel\\\": 1,\\n    \\\"sapmManagerDbId\\\": 385224\\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/addEscalatedManagersForSapmAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Kz5yJYw0niLklOa9BKXVN",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmAccount\")\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    \\\"sapmDbId\\\": 384810,\\n    \\\"newEscalatedManagers\\\": [\\n\\t\\t\\\"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\\\"\\n\\t],\\n    \\\"approvalLevel\\\": 1,\\n    \\\"sapmManagerDbId\\\": 385224\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "-YSDmGXBOvPKoGuKrGrX-",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmAccount\"\n\npayload = json.dumps(\"{\\n    \\\"sapmDbId\\\": 384810,\\n    \\\"newEscalatedManagers\\\": [\\n\\t\\t\\\"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\\\"\\n\\t],\\n    \\\"approvalLevel\\\": 1,\\n    \\\"sapmManagerDbId\\\": 385224\\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": "_bn-CMAAImrpPUJJbpup4"
    },
    "results": {
      "languages": [
        {
          "id": "3oAa7EqB9qIQ3xm-yOerD",
          "language": "200",
          "code": "{\n    \"dbId\": 384810,\n    \"device\": {\n        \"dbId\": 384676,\n        \"id\": \"d576e5d1-cf32-43e7-883e-64006cd09291\",\n        \"name\": \"Linux\",\n        \"accessProtocol\": \"SSHv2\",\n        \"managementIp\": \"10.20.40.77\"\n    },\n    \"secretName\": \"SSH SAPM\",\n    \"config\": {\n        \"configId\": -9077,\n        \"name\": \"Linux\",\n        \"description\": \"Linux\",\n        \"strategy\": \"SSH\",\n        \"staticSecretType\": \"OTHER\",\n        \"properties\": {\n            \"new.user.found.action\": \"LOG\",\n            \"username.parser\": \"(.*?) : (.*)\",\n            \"change.password.command.template\": \"passwd\\\\n${oldPassword}\\\\n${newPassword}\\\\n${newPassword}\\\\nlogout\",\n            \"user.list.command\": \"cut -d: -f1 /etc/passwd | xargs groups\"\n        },\n        \"exactMatch4Search\": false,\n        \"recordLimit4Search\": null,\n        \"duplicatedConfigId\": null\n    },\n    \"changePeriod\": 2880,\n    \"username\": \"efe\",\n    \"description\": null,\n    \"secretNotes\": null,\n    \"lastChangeTime\": 1694615160210,\n    \"nextChangeTime\": 1694787960210,\n    \"passwordSeenStatus\": \"UNSEEN\",\n    \"validationStatus\": \"VALID\",\n    \"masterAccountId\": null,\n    \"accountLevelProperties\": {},\n    \"permissions\": [\n        {\n            \"id\": \"f19ef6c4-bfa7-4743-b8e2-7c38cf5dd958\",\n            \"eid\": \"Group1\",\n            \"permission\": \"READ_ONLY\",\n            \"type\": \"USER_GROUP\"\n        }\n    ],\n    \"identicalSapmAccounts\": [],\n    \"parentSapmGroup\": {\n        \"dbId\": 384793,\n        \"id\": \"d3535aa7-eb10-4e3a-8dc8-322c96b19beb\",\n        \"name\": \"SSH SAPM GROUP\",\n        \"description\": null\n    },\n    \"secretType\": \"DYNAMIC\",\n    \"owner\": {\n        \"id\": \"8c49a580-7201-4a44-82bc-e20354560766\",\n        \"eid\": \"test_user3\"\n    },\n    \"createdAt\": 1694613892487,\n    \"updatedAt\": 1694616189840,\n    \"managers\": [\n        {\n            \"group\": {\n                \"id\": \"f88e37af-9922-45d3-a812-866e2e3571b2\",\n                \"eid\": \"Escalated\"\n            },\n            \"approvalLevel\": 1\n        }\n    ],\n    \"userPermissionLevel\": 6,\n    \"privateType\": \"YES\",\n    \"approvalStatus\": null,\n    \"escalatedManagers\": [\n        {\n            \"dbId\": 385410,\n            \"group\": {\n                \"id\": \"dbae236b-90b5-4b7b-9696-ab85df33766e\",\n                \"eid\": \"escalated2\"\n            },\n            \"approvalLevel\": 1\n        },\n        {\n            \"dbId\": 385346,\n            \"group\": {\n                \"id\": \"DEFAULT_GROUP_SYSYEM_ADMINS\",\n                \"eid\": \"System.admins\"\n            },\n            \"approvalLevel\": 1\n        },\n        {\n            \"dbId\": 385459,\n            \"group\": {\n                \"id\": \"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\",\n                \"eid\": \"escalated3\"\n            },\n            \"approvalLevel\": 1\n        }\n    ],\n    \"groupFullPath\": \"/SSH SAPM GROUP\",\n    \"approvedBy\": null,\n    \"approvedDate\": null,\n    \"approvalRequired\": false\n}"
        }
      ],
      "selectedLanguageId": "3oAa7EqB9qIQ3xm-yOerD"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}