---
title: Edit Vault Account
slug: kron-pam-api-collection-381-patch3/edit-vault-account
docTags: 
createdAt: 2026-10-21T06:07:16.182Z
---

{
  "id": "HjPIXz7-vHYors_jU3L-D",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/editSapmAccount",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This API allows any editable Vault account to be modified. The new value of the desired parameter must be sent in the request. Several examples of usage are available.</p>\n<ul>\n<li>\n<p><strong>sapmdbId</strong>: ID of the Vault account to be edited.</p>\n</li>\n<li>\n<p><strong>password</strong>: New password or certificate data.</p>\n</li>\n<li>\n<p><strong>sapmGroupdbId</strong>: ID of the SAPM group database.</p>\n</li>\n<li>\n<p><strong>useExistingPermissions</strong>: Indicates whether to use existing permissions.</p>\n</li>\n</ul>\n<hr>\n<h3>Edit Vault Account parameters</h3>\n<p><code>POST /rest/sc/sapm/editSapmAccount</code> accepts <code>SapmRequestModel</code>.</p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<table><thead><tr><th align=\"left\">JSON field</th><th align=\"left\">Type</th><th align=\"left\">Required</th><th align=\"left\">Description</th></tr></thead><tbody><tr><td align=\"left\"><code>sapmDbId</code></td><td align=\"left\">Long</td><td align=\"left\">Yes</td><td align=\"left\">Database ID of the Vault account to edit.</td></tr><tr><td align=\"left\"><code>secretName</code></td><td align=\"left\">String</td><td align=\"left\">No</td><td align=\"left\">Replacement account name.</td></tr><tr><td align=\"left\"><code>secretType</code></td><td align=\"left\">String</td><td align=\"left\">No</td><td align=\"left\">Replacement account type when supported.</td></tr><tr><td align=\"left\"><code>sapmGroupDbId</code></td><td align=\"left\">Long</td><td align=\"left\">No</td><td align=\"left\">Replacement parent Vault group database ID.</td></tr><tr><td align=\"left\"><code>passwordChangePeriod</code></td><td align=\"left\">String</td><td align=\"left\">No</td><td align=\"left\">Rotation interval in days.</td></tr><tr><td align=\"left\"><code>passwordChangePeriodCronExpression</code></td><td align=\"left\">String</td><td align=\"left\">No</td><td align=\"left\">Cron-based rotation schedule.</td></tr><tr><td align=\"left\"><code>description</code></td><td align=\"left\">String</td><td align=\"left\">No</td><td align=\"left\">Replacement account description.</td></tr><tr><td align=\"left\"><code>secretNotes</code></td><td align=\"left\">String</td><td align=\"left\">No</td><td align=\"left\">Replacement encrypted notes.</td></tr><tr><td align=\"left\"><code>additionalInfo</code></td><td align=\"left\">String</td><td align=\"left\">No</td><td align=\"left\">Additional account information.</td></tr><tr><td align=\"left\"><code>accountLevelProperties</code></td><td align=\"left\">Object</td><td align=\"left\">No</td><td align=\"left\">Replacement account-level properties.</td></tr><tr><td align=\"left\"><code>useExistingPermissions</code></td><td align=\"left\">Boolean</td><td align=\"left\">No</td><td align=\"left\">Controls permission inheritance when moving the account.</td></tr></tbody></table>\n<p>Password changes are rejected by this endpoint; use the dedicated Update Password request.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "Content-Type",
          "description": "",
          "default": "application/json",
          "value": "application/json",
          "type": "string"
        },
        {
          "name": "Cookie",
          "description": "",
          "default": "{{netrightCookie}} ",
          "value": "{{netrightCookie}} ",
          "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  \"sapmDbId\": 2000001,\n  \"secretName\": \"renamed-dynamic-account\",\n  \"sapmGroupDbId\": 383826,\n  \"passwordChangePeriod\": \"2\",\n  \"useExistingPermissions\": true\n}",
          "value": "{\n  \"sapmDbId\": 2000001,\n  \"secretName\": \"renamed-dynamic-account\",\n  \"sapmGroupDbId\": 383826,\n  \"passwordChangePeriod\": \"2\",\n  \"useExistingPermissions\": true\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>Edit Vault Account - Rename, move, and change interval</p>",
        "jsonExample": "{\n  \"dbId\": 2000001,\n  \"device\": null,\n  \"secretName\": \"renamed-dynamic-account\",\n  \"config\": {\n    \"configId\": 12345,\n    \"name\": \"Example Dynamic Configuration\",\n    \"description\": \"Example dynamic configuration\",\n    \"strategy\": \"DYNAMIC\",\n    \"properties\": {}\n  },\n  \"changePeriod\": 1440,\n  \"username\": \"app_user\",\n  \"description\": null,\n  \"secretNotes\": null,\n  \"lastChangeTime\": null,\n  \"nextChangeTime\": 1893542400000,\n  \"passwordSeenStatus\": \"UNSEEN\",\n  \"validationStatus\": \"UNKNOWN\",\n  \"masterAccountId\": null,\n  \"accountLevelProperties\": {},\n  \"permissions\": [],\n  \"identicalSapmAccounts\": [],\n  \"parentSapmGroup\": {\n    \"dbId\": 383826,\n    \"id\": \"00000000-0000-4000-8000-000000000001\",\n    \"name\": \"Example Group\",\n    \"description\": null\n  },\n  \"secretType\": \"DYNAMIC\",\n  \"owner\": {\n    \"id\": \"00000000-0000-4000-8000-000000000002\",\n    \"eid\": \"example.admin\"\n  },\n  \"createdAt\": 1893456000000,\n  \"updatedAt\": 1893456000000,\n  \"managers\": [],\n  \"userPermissionLevel\": 6,\n  \"approvalStatus\": null,\n  \"groupFullPath\": \"/Example Group\",\n  \"approvedBy\": null,\n  \"approvedDate\": null,\n  \"approvalRequired\": false\n}"
      },
      {
        "statusCode": "200",
        "description": "<p>Edit Vault Account - Cron rotation</p>",
        "jsonExample": "{\n  \"dbId\": 2000001,\n  \"device\": null,\n  \"secretName\": \"dynamic-db-password\",\n  \"config\": {\n    \"configId\": 12345,\n    \"name\": \"Example Dynamic Configuration\",\n    \"description\": \"Example dynamic configuration\",\n    \"strategy\": \"DYNAMIC\",\n    \"properties\": {}\n  },\n  \"changePeriod\": 1440,\n  \"username\": \"app_user\",\n  \"description\": null,\n  \"secretNotes\": null,\n  \"lastChangeTime\": null,\n  \"nextChangeTime\": 1893542400000,\n  \"passwordSeenStatus\": \"UNSEEN\",\n  \"validationStatus\": \"UNKNOWN\",\n  \"masterAccountId\": null,\n  \"accountLevelProperties\": {},\n  \"permissions\": [],\n  \"identicalSapmAccounts\": [],\n  \"parentSapmGroup\": {\n    \"dbId\": 383826,\n    \"id\": \"00000000-0000-4000-8000-000000000001\",\n    \"name\": \"Example Group\",\n    \"description\": null\n  },\n  \"secretType\": \"DYNAMIC\",\n  \"owner\": {\n    \"id\": \"00000000-0000-4000-8000-000000000002\",\n    \"eid\": \"example.admin\"\n  },\n  \"createdAt\": 1893456000000,\n  \"updatedAt\": 1893456000000,\n  \"managers\": [],\n  \"userPermissionLevel\": 6,\n  \"approvalStatus\": null,\n  \"groupFullPath\": \"/Example Group\",\n  \"approvedBy\": null,\n  \"approvedDate\": null,\n  \"approvalRequired\": false\n}"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "q9yzFrGpqmqHiFsfIyDOh",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/editSapmAccount \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --cookie {{netrightCookie}}  \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\n  \\\"sapmDbId\\\": 2000001,\\n  \\\"secretName\\\": \\\"renamed-dynamic-account\\\",\\n  \\\"sapmGroupDbId\\\": 383826,\\n  \\\"passwordChangePeriod\\\": \\\"2\\\",\\n  \\\"useExistingPermissions\\\": true\\n}\"'"
        },
        {
          "id": "k1h66jiRroSE2ydJoOI__",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"cookie\", \"{{netrightCookie}} \");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar raw = JSON.stringify(\"{\\n  \\\"sapmDbId\\\": 2000001,\\n  \\\"secretName\\\": \\\"renamed-dynamic-account\\\",\\n  \\\"sapmGroupDbId\\\": 383826,\\n  \\\"passwordChangePeriod\\\": \\\"2\\\",\\n  \\\"useExistingPermissions\\\": true\\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/editSapmAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "P5HwvU0xqaQiNtIgIX99W",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/editSapmAccount\")\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[\"cookie\"] = \"{{netrightCookie}} \"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"{\\n  \\\"sapmDbId\\\": 2000001,\\n  \\\"secretName\\\": \\\"renamed-dynamic-account\\\",\\n  \\\"sapmGroupDbId\\\": 383826,\\n  \\\"passwordChangePeriod\\\": \\\"2\\\",\\n  \\\"useExistingPermissions\\\": true\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Kh-r2hEfNmevrTW_J8KmH",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/editSapmAccount\"\n\npayload = json.dumps(\"{\\n  \\\"sapmDbId\\\": 2000001,\\n  \\\"secretName\\\": \\\"renamed-dynamic-account\\\",\\n  \\\"sapmGroupDbId\\\": 383826,\\n  \\\"passwordChangePeriod\\\": \\\"2\\\",\\n  \\\"useExistingPermissions\\\": true\\n}\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'cookie': '{{netrightCookie}} ',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "q9yzFrGpqmqHiFsfIyDOh"
    },
    "results": {
      "languages": [
        {
          "id": "131VyMhRcq5ZXzGXdcu9h",
          "language": "200",
          "code": "{\n  \"dbId\": 2000001,\n  \"device\": null,\n  \"secretName\": \"renamed-dynamic-account\",\n  \"config\": {\n    \"configId\": 12345,\n    \"name\": \"Example Dynamic Configuration\",\n    \"description\": \"Example dynamic configuration\",\n    \"strategy\": \"DYNAMIC\",\n    \"properties\": {}\n  },\n  \"changePeriod\": 1440,\n  \"username\": \"app_user\",\n  \"description\": null,\n  \"secretNotes\": null,\n  \"lastChangeTime\": null,\n  \"nextChangeTime\": 1893542400000,\n  \"passwordSeenStatus\": \"UNSEEN\",\n  \"validationStatus\": \"UNKNOWN\",\n  \"masterAccountId\": null,\n  \"accountLevelProperties\": {},\n  \"permissions\": [],\n  \"identicalSapmAccounts\": [],\n  \"parentSapmGroup\": {\n    \"dbId\": 383826,\n    \"id\": \"00000000-0000-4000-8000-000000000001\",\n    \"name\": \"Example Group\",\n    \"description\": null\n  },\n  \"secretType\": \"DYNAMIC\",\n  \"owner\": {\n    \"id\": \"00000000-0000-4000-8000-000000000002\",\n    \"eid\": \"example.admin\"\n  },\n  \"createdAt\": 1893456000000,\n  \"updatedAt\": 1893456000000,\n  \"managers\": [],\n  \"userPermissionLevel\": 6,\n  \"approvalStatus\": null,\n  \"groupFullPath\": \"/Example Group\",\n  \"approvedBy\": null,\n  \"approvedDate\": null,\n  \"approvalRequired\": false\n}"
        },
        {
          "id": "ZVS_1lGvosoeZmhUXPF1d",
          "language": "200",
          "code": "{\n  \"dbId\": 2000001,\n  \"device\": null,\n  \"secretName\": \"dynamic-db-password\",\n  \"config\": {\n    \"configId\": 12345,\n    \"name\": \"Example Dynamic Configuration\",\n    \"description\": \"Example dynamic configuration\",\n    \"strategy\": \"DYNAMIC\",\n    \"properties\": {}\n  },\n  \"changePeriod\": 1440,\n  \"username\": \"app_user\",\n  \"description\": null,\n  \"secretNotes\": null,\n  \"lastChangeTime\": null,\n  \"nextChangeTime\": 1893542400000,\n  \"passwordSeenStatus\": \"UNSEEN\",\n  \"validationStatus\": \"UNKNOWN\",\n  \"masterAccountId\": null,\n  \"accountLevelProperties\": {},\n  \"permissions\": [],\n  \"identicalSapmAccounts\": [],\n  \"parentSapmGroup\": {\n    \"dbId\": 383826,\n    \"id\": \"00000000-0000-4000-8000-000000000001\",\n    \"name\": \"Example Group\",\n    \"description\": null\n  },\n  \"secretType\": \"DYNAMIC\",\n  \"owner\": {\n    \"id\": \"00000000-0000-4000-8000-000000000002\",\n    \"eid\": \"example.admin\"\n  },\n  \"createdAt\": 1893456000000,\n  \"updatedAt\": 1893456000000,\n  \"managers\": [],\n  \"userPermissionLevel\": 6,\n  \"approvalStatus\": null,\n  \"groupFullPath\": \"/Example Group\",\n  \"approvedBy\": null,\n  \"approvedDate\": null,\n  \"approvalRequired\": false\n}"
        }
      ],
      "selectedLanguageId": "131VyMhRcq5ZXzGXdcu9h"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}