---
title: Edit Sapm Account
slug: single-connect-api-3-0-3/edit-sapm-account
description: Learn how to edit a SAPM account with this step-by-step guide. Our comprehensive document provides a code example using cURL to make a POST request. Discover the necessary URL, headers for JSON data, and request body to effortlessly perform account edits.
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "fFzNs1R7SI3OquO8rcWnN",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/editSapmAccount",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "Cookie",
          "type": "string",
          "example": "{{netrightCookie}} ",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\t\n\t\"sapmDbId\":85623,\n\t\"secretName\":\"new sapm-dynamic-type\",\n\t\"passwordChangePeriod\":\"50\",\n\t\"sapmGroupDbId\":85220\n}\n\n",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "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": ""
      }
    ],
    "contentType": "application/json",
    "description": "<p>Using this API, you can edit any SAPM account you are allowed to edit. You should send the new value of the desired parameter. There are several examples.</p>",
    "examples": {
      "languages": [
        {
          "id": "XHxDoEHegHUQsV5fzp7PJ",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/editSapmAccount \\\n     --header 'accept: application/json'"
        },
        {
          "id": "TlCtFeXghHB0DyHjKVjxS",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\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": "lTNUznV2nOGyR0hv3IWaZ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\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\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "hRg0bG0nFPqTv9rt0rkXO",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/editSapmAccount\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "XHxDoEHegHUQsV5fzp7PJ"
    },
    "results": {
      "languages": [
        {
          "id": "LyjZMgxKDsdUuojkjcddZ",
          "language": "200",
          "code": "// Edit Sapm Account (Static Strategy SSL Cert)\n"
        },
        {
          "id": "8eErotYPzx8S2yCtc1Hhc",
          "language": "200",
          "code": "// Edit Sapm Account (dynamic-type)\n"
        },
        {
          "id": "In9GpNdA0nE6G9cKJb-mh",
          "language": "200",
          "code": "// Edit Sapm Account(Static Type Dynamic Strategy)\n"
        },
        {
          "id": "-tKOjgFhjjySybV7iqODr",
          "language": "200",
          "code": "// Edit Sapm Account (Static Strategy SSH key)\n"
        },
        {
          "id": "MsUv94hQvDdrbaNjaVkw4",
          "language": "200",
          "code": "// Edit Sapm Account (Static Type User Credential)\n"
        },
        {
          "id": "55sMi9hJCOBCBgaVYs72P",
          "language": "200",
          "code": "// Edit Sapm Account(Static Strategy Other)\n"
        }
      ],
      "selectedLanguageId": "LyjZMgxKDsdUuojkjcddZ"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}