---
title: Sapm Show Password
slug: single-connect-api-3-2-0/sapm-show-password
description: Learn how to use the CURL command to make a successful POST request to a specific URL and endpoint with this code example. Understand how to include headers for accepting and sending data in JSON format, and define the request body as a JSON object with a
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "Y81RfsD_HhUsq3W1FpH78",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/showPassword",
    "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": "{\n\t\"sapmDbId\":10710, \n\t\"passwordExpirationInMinute\": 30, \n\t\"comment\":\"restTest\"\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>sapm/showPassword</p>",
        "jsonExample": "{\n    \"password\": \"8Xz7PEmr\",\n    \"passwordPart\": \"FULL\"\n}"
      }
    ],
    "contentType": "application/json",
    "description": "<p>This will show you SAPM account's password if you have approval or permission to see the password. You should send SAPM account's dbId, password expiration in minute and comment to see password.</p>",
    "examples": {
      "languages": [
        {
          "id": "VN6IZiunjQeO3I3nWW7r6",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/showPassword \\\n     --header 'accept: application/json'"
        },
        {
          "id": "8hIcJo-AsErpPJwIQIAOS",
          "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/showPassword\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "gHsdTcT9UjsVZuSDr-W8h",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/showPassword\")\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": "pK47sXaz5wMy19LzjUFdd",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/showPassword\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "VN6IZiunjQeO3I3nWW7r6"
    },
    "results": {
      "languages": [
        {
          "id": "m_8_kBtNgg5W6FCXOuw7b",
          "language": "200",
          "code": "{\n    \"password\": \"8Xz7PEmr\",\n    \"passwordPart\": \"FULL\"\n}"
        }
      ],
      "selectedLanguageId": "m_8_kBtNgg5W6FCXOuw7b"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}