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

{
  "id": "OG8hRq3VMoisap03w4rif",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/bulkResetPassword",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This API allows you to reset the password of a dynamic account within KRON PAM. Given that KRON PAM already possesses the current password of the specified account, the system will solely reset the password and maintain its record.</p>\n<h3>Request Body Format</h3>\n<p>You should format your request body as an array of Vault Account IDs:</p>\n<pre><code class=\"language-json\">[\n    \"Vault Account ID #1\",\n    \"Vault Account ID #2\" ...\n]\n\n</code></pre>\n<p>Replace \"Vault Account ID\" with the actual IDs of the accounts whose passwords you wish to reset.</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": "[384810,384810]",
          "value": "[384810,384810]",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Bulk Reset Password",
        "jsonExample": "[\n    384810,\n    384810\n]"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "PneMzCLHwYDPbJTS7lkPt",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/bulkResetPassword \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"[384810,384810]\"'"
        },
        {
          "id": "Xi_dSZWuzlsSEkpC9foYZ",
          "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(\"[384810,384810]\");\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/bulkResetPassword\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Kuv1Ju0fxBZ8_ADPs1VRL",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/bulkResetPassword\")\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(\"[384810,384810]\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Ed7tJFUmQsEcxdLBJVE7a",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/bulkResetPassword\"\n\npayload = json.dumps(\"[384810,384810]\")\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": "PneMzCLHwYDPbJTS7lkPt"
    },
    "results": {
      "languages": [
        {
          "id": "zhAIiEL7rSMPu3yYvzabe",
          "language": "200",
          "code": "[\n    384810,\n    384810\n]"
        }
      ],
      "selectedLanguageId": "zhAIiEL7rSMPu3yYvzabe"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}