---
title: AAPM Basic
slug: single-connect-api-3-2-0/aapm-basic
description: Learn how to use the curl command effectively with this comprehensive document. Discover a code example that demonstrates making a GET request to a specified URL, including parameters, headers, and data in convenient JSON format for enhanced understanding
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "CIpKUj_8Qsjh2WaqoIYb6",
  "data": {
    "url": "{{url}}/sc-aapm-ui/rest/aapm/password?passwordExpirationInMinute=30&passwordChangeRequired=TRUE_or_FALSE&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&responseType=JSON",
    "method": "GET",
    "request": {
      "pathParameters": [],
      "queryParameters": [
        {
          "name": "passwordExpirationInMinute",
          "type": "string",
          "example": "30",
          "description": "Password expiration minute. "
        },
        {
          "name": "passwordChangeRequired",
          "type": "string",
          "example": "TRUE_or_FALSE",
          "description": "Default value is false."
        },
        {
          "name": "comment",
          "type": "string",
          "example": "COMMENT",
          "description": ""
        },
        {
          "name": "token",
          "type": "string",
          "example": "TOKEN",
          "description": ""
        },
        {
          "name": "sapmAccountPath",
          "type": "string",
          "example": "ACCOUNT_PATH",
          "description": "<p>If there is only 1 SAPM Account related to the token, this param. can be null</p>"
        },
        {
          "name": "sapmAccountName",
          "type": "string",
          "example": "ACCOUNT_NAME",
          "description": ""
        },
        {
          "name": "pin",
          "type": "string",
          "example": "PIN",
          "description": ""
        },
        {
          "name": "responseType",
          "type": "string",
          "example": "JSON",
          "description": "User has to set this parameter to JSON if JSON response is needed."
        }
      ],
      "headerParameters": [
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "<p>This method gives the secret data of bound SAPM account.\r\nFor AAPM accounts which are bound to a single SAPM account, the parameters sapmAccountPath and sapmAccountName are not needed.\r\nFor AAPM accounts which are bount to multiple SAPM accounts&#x26;groups the user must have set sapmAccountPath and sapmAccountName parameters together with the token.\r\nresponseType=JSON parameter returns the response as JSON. If this parameter is not set, the return type for dynamic accounts are plain text.</p>",
    "examples": {
      "languages": [
        {
          "id": "HjomZZeyRjWthf2II2bY7",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url '{{url}}/sc-aapm-ui/rest/aapm/password?passwordExpirationInMinute=30&passwordChangeRequired=TRUE_or_FALSE&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&responseType=JSON' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "vYj0CreFMh22_gqEd8XQQ",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/sc-aapm-ui/rest/aapm/password?passwordExpirationInMinute=30&passwordChangeRequired=TRUE_or_FALSE&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&responseType=JSON\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "SyPM48igOvNQtELm3hm0d",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/sc-aapm-ui/rest/aapm/password?passwordExpirationInMinute=30&passwordChangeRequired=TRUE_or_FALSE&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&responseType=JSON\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "5S57Ee1nBQvoTmh4PBhFq",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/sc-aapm-ui/rest/aapm/password?passwordExpirationInMinute=30&passwordChangeRequired=TRUE_or_FALSE&comment=COMMENT&token=TOKEN&sapmAccountPath=ACCOUNT_PATH&sapmAccountName=ACCOUNT_NAME&responseType=JSON\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "HjomZZeyRjWthf2II2bY7"
    },
    "results": {
      "languages": [
        {
          "id": "p0WFDC0OqWkHaWsi1Gj4B",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "p0WFDC0OqWkHaWsi1Gj4B"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}