---
title: Bulk Update Password
slug: kronpam-api-collection-3-6-0/bulk-update-password
docTags: 
createdAt: 2025-01-20T13:35:40.976Z
---

{
  "id": "lSkLUp0yMbr-ZAb8tj8_V",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/bulkUpdatePassword",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This API lets you reset the password of an existing dynamic account in KRON PAM. KRON PAM will simply update the password, as it already knows the current one.</p>\n<h3>How to Use</h3>\n<p>Submit the Vault Account ID(s) of the account(s) you want to reset in the request body.</p>",
    "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\t\"sapmDbIdList\":[388229,387462],\n    \"newPassword\": \"Kron12345!\"\n}",
          "value": "{\n\t\"sapmDbIdList\":[388229,387462],\n    \"newPassword\": \"Kron12345!\"\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Bulk Update Password",
        "jsonExample": "[\n    388229,\n    387462\n]"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "dmkfNcY6hctV7fngMDt92",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/bulkUpdatePassword \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\n\\t\\\"sapmDbIdList\\\":[388229,387462],\\n    \\\"newPassword\\\": \\\"Kron12345!\\\"\\n}\"'"
        },
        {
          "id": "mM-drVPeucmu88w_p81li",
          "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\\t\\\"sapmDbIdList\\\":[388229,387462],\\n    \\\"newPassword\\\": \\\"Kron12345!\\\"\\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/bulkUpdatePassword\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "4a7Uhd1KNrvFbq8qE9snB",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/bulkUpdatePassword\")\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\\t\\\"sapmDbIdList\\\":[388229,387462],\\n    \\\"newPassword\\\": \\\"Kron12345!\\\"\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "UyNjXS71JUM42F9Qpyj0S",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/bulkUpdatePassword\"\n\npayload = json.dumps(\"{\\n\\t\\\"sapmDbIdList\\\":[388229,387462],\\n    \\\"newPassword\\\": \\\"Kron12345!\\\"\\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": "dmkfNcY6hctV7fngMDt92"
    },
    "results": {
      "languages": [
        {
          "id": "kRBPjlIrGhpgNhWqGMrN7",
          "language": "200",
          "code": "[\n    388229,\n    387462\n]"
        }
      ],
      "selectedLanguageId": "kRBPjlIrGhpgNhWqGMrN7"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}