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

{
  "id": "DCx7aVj_pnY_iWmXXi8_g",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/updatePasswordWithFile?sapmDbId=974563",
    "name": "",
    "description": "<ol>\n<li><code>Use the List Vault Groups</code> request to identify the 'dbId' of the Vault Group containing the Vault Account you want to edit.</li>\n<li>Input this 'dbId' into the dbId parameter of the <code>List Accounts of Vault Group</code> request.</li>\n<li>From the returned data, find the 'dbId' of the specific Vault Account you wish to modify and insert it into the <code>Edit Vault Account with File requests</code> <strong>sapmDbId param</strong>.</li>\n<li>Proceed with the upload as you would with the <code>Add Vault Account with File</code> request, following the same process for file uploading.</li>\n</ol>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "Cookie",
          "description": "",
          "default": "{{netrightCookie}}",
          "value": "{{netrightCookie}}",
          "type": "string"
        },
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [
        {
          "name": "sapmDbId",
          "description": "",
          "default": "974563",
          "value": "974563",
          "type": "string"
        }
      ],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [
        {
          "name": "file",
          "description": "",
          "default": "",
          "value": "",
          "type": "file"
        }
      ],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "Oe4XWQfudwaHEZWG1SUtU",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url '{{url}}/aioc-rest-web/rest/sc/sapm/updatePasswordWithFile?sapmDbId=974563&sapmDbId=974563' \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --cookie {{netrightCookie}} \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --form 'file=\"file\"'"
        },
        {
          "id": "-6lWaf3lTvY3xlufXg1q7",
          "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 formdata = new FormData();\nformdata.append(\"file\", \"file\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: formdata,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sapm/updatePasswordWithFile?sapmDbId=974563&sapmDbId=974563\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "28--Jolo27vgFELITGnQ2",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/updatePasswordWithFile?sapmDbId=974563&sapmDbId=974563\")\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}}\"\nform_data = [['file', File.open('undefined')]]\nrequest.set_form form_data, 'multipart/form-data'\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "_WJl-CElTlcr78r0yMUqD",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/updatePasswordWithFile?sapmDbId=974563&sapmDbId=974563\"\n\npayload = {}\nfiles=[\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, files=files)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Oe4XWQfudwaHEZWG1SUtU"
    },
    "results": {
      "languages": [
        {
          "id": "XFb_H2vzfIioeDRvW0EAN",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "XFb_H2vzfIioeDRvW0EAN"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}