---
title: Edit Vault Account
slug: kronpam-api-collection-350/edit-vault-account
docTags: 
createdAt: 2024-07-22T09:58:47.224Z
---

{
  "id": "o2q6mCatGY_m-PSaSUF4B",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/editSapmAccount",
    "name": "",
    "description": "<p>Using this API, you can edit any Vault account you are allowed to edit. You should send the new value of the desired parameter. There are several examples.</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": "{\t\n\t\"sapmDbId\":85623,\n\t\"secretName\":\"new sapm-dynamic-type\",\n\t\"passwordChangePeriod\":\"50\",\n\t\"sapmGroupDbId\":85220\n}\n\n",
          "value": "{\t\n\t\"sapmDbId\":85623,\n\t\"secretName\":\"new sapm-dynamic-type\",\n\t\"passwordChangePeriod\":\"50\",\n\t\"sapmGroupDbId\":85220\n}\n\n",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>Edit Vault Account (Static Strategy SSL Cert)</p>",
        "jsonExample": ""
      },
      {
        "statusCode": "200",
        "description": "<p>Edit Vault Account (dynamic-type)</p>",
        "jsonExample": ""
      },
      {
        "statusCode": "200",
        "description": "<p>Edit Vault Account(Static Type Dynamic Strategy)</p>",
        "jsonExample": ""
      },
      {
        "statusCode": "200",
        "description": "<p>Edit Vault Account (Static Strategy SSH key)</p>",
        "jsonExample": ""
      },
      {
        "statusCode": "200",
        "description": "<p>Edit Vault Account (Static Type User Credential)</p>",
        "jsonExample": ""
      },
      {
        "statusCode": "200",
        "description": "<p>Edit Vault Account(Static Strategy Other)</p>",
        "jsonExample": ""
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "uD571sw_4i4icQ5HSZDd0",
          "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 '\"{\\t\\n\\t\\\"sapmDbId\\\":85623,\\n\\t\\\"secretName\\\":\\\"new sapm-dynamic-type\\\",\\n\\t\\\"passwordChangePeriod\\\":\\\"50\\\",\\n\\t\\\"sapmGroupDbId\\\":85220\\n}\\n\\n\"'"
        },
        {
          "id": "s4l9Gza-DW2xHKWAOPdfb",
          "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(\"{\\t\\n\\t\\\"sapmDbId\\\":85623,\\n\\t\\\"secretName\\\":\\\"new sapm-dynamic-type\\\",\\n\\t\\\"passwordChangePeriod\\\":\\\"50\\\",\\n\\t\\\"sapmGroupDbId\\\":85220\\n}\\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/editSapmAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "lIrwNWQzudImeO6uZVcnJ",
          "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(\"{\\t\\n\\t\\\"sapmDbId\\\":85623,\\n\\t\\\"secretName\\\":\\\"new sapm-dynamic-type\\\",\\n\\t\\\"passwordChangePeriod\\\":\\\"50\\\",\\n\\t\\\"sapmGroupDbId\\\":85220\\n}\\n\\n\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "OwSOXMlW_S13UxDPNW24H",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/editSapmAccount\"\n\npayload = json.dumps(\"{\\t\\n\\t\\\"sapmDbId\\\":85623,\\n\\t\\\"secretName\\\":\\\"new sapm-dynamic-type\\\",\\n\\t\\\"passwordChangePeriod\\\":\\\"50\\\",\\n\\t\\\"sapmGroupDbId\\\":85220\\n}\\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": "uD571sw_4i4icQ5HSZDd0"
    },
    "results": {
      "languages": [
        {
          "id": "SQHpdXxpcV46OIP6OBCug",
          "language": "200",
          "code": "// Edit Vault Account (Static Strategy SSL Cert)\n"
        },
        {
          "id": "8sd4ksbZFuzzEynJrq_7W",
          "language": "200",
          "code": "// Edit Vault Account (dynamic-type)\n"
        },
        {
          "id": "OW2gZmHL0asi406PW83rr",
          "language": "200",
          "code": "// Edit Vault Account(Static Type Dynamic Strategy)\n"
        },
        {
          "id": "6KJRjxxFXLgcwHF_j4mzG",
          "language": "200",
          "code": "// Edit Vault Account (Static Strategy SSH key)\n"
        },
        {
          "id": "9dKca09Szeak1bx-vtpCP",
          "language": "200",
          "code": "// Edit Vault Account (Static Type User Credential)\n"
        },
        {
          "id": "06iAv9zk4Rx9GN4OsFCcZ",
          "language": "200",
          "code": "// Edit Vault Account(Static Strategy Other)\n"
        }
      ],
      "selectedLanguageId": "SQHpdXxpcV46OIP6OBCug"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}