---
title: Vault Set Password by Manually
slug: kron-pam-api-collection-381-patch3/vault-set-password-by-manually
docTags: 
createdAt: 2026-10-21T06:07:16.182Z
---

{
  "id": "m8OMdyuSxK6-nWhJN6gLO",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/resetPasswordWithManualPassword",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This API allows the manual setting of a password for any SAPM account that you have permission to edit. You can modify the account by sending new values for the desired parameters.</p>\n<ul>\n<li>\n<p><strong>sapmdbId</strong>: The identifier of the SAPM account that will be edited.</p>\n</li>\n<li>\n<p><strong>secretName</strong>: The new name of the secret associated with the SAPM account.</p>\n</li>\n<li>\n<p><strong>passwordChangePeriod</strong>: The interval in days for when the password will automatically be changed.</p>\n</li>\n<li>\n<p><strong>sapmGroupdbId</strong>: The identifier of the SAPM group to which the account belongs.</p>\n</li>\n<li>\n<p><strong>useExistingPermissions</strong>: A boolean value indicating whether to use the existing permissions for the account. If set to <code>false</code>, new permissions need to be specified.</p>\n</li>\n</ul>\n<p>By following these steps, you can effectively update the password or other parameters of a SAPM account manually.</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\": 478160,\n    \"sapmConfigId\": 56349,\n    \"password\": \"NEW_MANUAL_PASSWORD\",\n    \"comment\": \"SOME_COMMENT\",\n    \"passwordExpirationInMinute\": \"5m\"    // Optional, default value is 30 minutes\n\n}",
          "value": "{\n    \"sapmDbId\": 478160,\n    \"sapmConfigId\": 56349,\n    \"password\": \"NEW_MANUAL_PASSWORD\",\n    \"comment\": \"SOME_COMMENT\",\n    \"passwordExpirationInMinute\": \"5m\"    // Optional, default value is 30 minutes\n\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>Edit Sapm Account (Static Strategy SSL Cert)</p>",
        "jsonExample": ""
      },
      {
        "statusCode": "200",
        "description": "<p>Edit Sapm Account (dynamic-type)</p>",
        "jsonExample": ""
      },
      {
        "statusCode": "200",
        "description": "<p>Edit Sapm Account(Static Type Dynamic Strategy)</p>",
        "jsonExample": ""
      },
      {
        "statusCode": "200",
        "description": "<p>Edit Sapm Account (Static Strategy SSH key)</p>",
        "jsonExample": ""
      },
      {
        "statusCode": "200",
        "description": "<p>Edit Sapm Account (Static Type User Credential)</p>",
        "jsonExample": ""
      },
      {
        "statusCode": "200",
        "description": "<p>Edit Sapm Account(Static Strategy Other)</p>",
        "jsonExample": ""
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "L8xk1m34V3uZt9I9bDGDE",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/resetPasswordWithManualPassword \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --cookie {{netrightCookie}}  \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\n    \\\"sapmDbId\\\": 478160,\\n    \\\"sapmConfigId\\\": 56349,\\n    \\\"password\\\": \\\"NEW_MANUAL_PASSWORD\\\",\\n    \\\"comment\\\": \\\"SOME_COMMENT\\\",\\n    \\\"passwordExpirationInMinute\\\": \\\"5m\\\"    // Optional, default value is 30 minutes\\n\\n}\"'"
        },
        {
          "id": "7pq9EglBdvHknWUXARgKj",
          "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\\\": 478160,\\n    \\\"sapmConfigId\\\": 56349,\\n    \\\"password\\\": \\\"NEW_MANUAL_PASSWORD\\\",\\n    \\\"comment\\\": \\\"SOME_COMMENT\\\",\\n    \\\"passwordExpirationInMinute\\\": \\\"5m\\\"    // Optional, default value is 30 minutes\\n\\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/resetPasswordWithManualPassword\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "nLGQhKaR0-TmA767h8B80",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/resetPasswordWithManualPassword\")\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\\\": 478160,\\n    \\\"sapmConfigId\\\": 56349,\\n    \\\"password\\\": \\\"NEW_MANUAL_PASSWORD\\\",\\n    \\\"comment\\\": \\\"SOME_COMMENT\\\",\\n    \\\"passwordExpirationInMinute\\\": \\\"5m\\\"    // Optional, default value is 30 minutes\\n\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "jtoEioEXx1UGBONAL1KYD",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/resetPasswordWithManualPassword\"\n\npayload = json.dumps(\"{\\n    \\\"sapmDbId\\\": 478160,\\n    \\\"sapmConfigId\\\": 56349,\\n    \\\"password\\\": \\\"NEW_MANUAL_PASSWORD\\\",\\n    \\\"comment\\\": \\\"SOME_COMMENT\\\",\\n    \\\"passwordExpirationInMinute\\\": \\\"5m\\\"    // Optional, default value is 30 minutes\\n\\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": "L8xk1m34V3uZt9I9bDGDE"
    },
    "results": {
      "languages": [
        {
          "id": "tLcRjKWAYViJld1nMgfRT",
          "language": "200",
          "code": "// Edit Sapm Account (Static Strategy SSL Cert)\n"
        },
        {
          "id": "wlPzrJCt4tBmyyRQs_2TJ",
          "language": "200",
          "code": "// Edit Sapm Account (dynamic-type)\n"
        },
        {
          "id": "gI7rR1rd9u8DOiRX5cBwh",
          "language": "200",
          "code": "// Edit Sapm Account(Static Type Dynamic Strategy)\n"
        },
        {
          "id": "sgBPW1Yl9Hc1s008-KEn5",
          "language": "200",
          "code": "// Edit Sapm Account (Static Strategy SSH key)\n"
        },
        {
          "id": "7cbx8b6mEqYtJKcxatGAL",
          "language": "200",
          "code": "// Edit Sapm Account (Static Type User Credential)\n"
        },
        {
          "id": "KSnO10QYesywotR0Ik7H2",
          "language": "200",
          "code": "// Edit Sapm Account(Static Strategy Other)\n"
        }
      ],
      "selectedLanguageId": "tLcRjKWAYViJld1nMgfRT"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}