---
title: Sapm Show Password
slug: single-connect-api-3-0-3/sapm-show-password
description: Learn how to use the curl command for making a POST request to a specific URL with this helpful document. Find a comprehensive code example that demonstrates how to add headers for accepting and specifying JSON content type, along with providing the reque
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "2FkZFvWQT5aFjcsQ_u-Ha",
  "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": "dBa2xL1QdRyjrd4EHk-_T",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/showPassword \\\n     --header 'accept: application/json'"
        },
        {
          "id": "z7mo-bY_7SZ0xlDdKRfpT",
          "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": "fuwNW6ABmQXdMIUvY5Utn",
          "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": "R5TW9hT1KsKwT0kprBe4v",
          "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": "dBa2xL1QdRyjrd4EHk-_T"
    },
    "results": {
      "languages": [
        {
          "id": "Mu_iHjcR8Z-17rHSgVOUU",
          "language": "200",
          "code": "{\n    \"password\": \"8Xz7PEmr\",\n    \"passwordPart\": \"FULL\"\n}"
        }
      ],
      "selectedLanguageId": "Mu_iHjcR8Z-17rHSgVOUU"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}