---
title: Show Old Passwords
slug: single-connect-api-3-2-0/show-old-passwords
description: Learn how to use the curl command to send a POST request to a custom URL with this helpful code example. Discover how to include headers, such as accepting and specifying JSON content types, and pass a string as the request body. Improve your coding skill
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "XNfJtyUhgdgEQRw2U4UR9",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/showOldPasswords",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\n\t\"sapmDbId\":85287,\n\t\"startDate\":\"2020-05-03 19:45:00:00\",\n\t\"endDate\":\"2020-05-05 21:45:00:00\"\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This API allows you to see show old passwords of sent SAPM dbId in given time interval. ",
    "examples": {
      "languages": [
        {
          "id": "Swv2VHQoVbG-OL648meB9",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/showOldPasswords \\\n     --header 'accept: application/json'"
        },
        {
          "id": "o2JZE97rttKQNaMFS9Y3f",
          "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/showOldPasswords\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Qq0CnbjkI5iAwvdN61sVN",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/showOldPasswords\")\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": "UNPYnb2DbZ0knltaYMofz",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/showOldPasswords\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Swv2VHQoVbG-OL648meB9"
    },
    "results": {
      "languages": [
        {
          "id": "ykLjtJEYIaxu3oZrBEm79",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "ykLjtJEYIaxu3oZrBEm79"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}