---
title: Application Token Basic
slug: kronpam-api-collection-3-6-0/application-token-basic
docTags: 
createdAt: 2025-01-20T13:35:40.976Z
---

{
  "id": "BMCoCzcVmbyeeUICKcnqA",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "{{url}}/aioc-rest-web/rest/aapm/request/password?passwordExpirationInMinute=30&passwordChangeRequired=TRUE&comment=COMMENT&token=ee3a55e7-5ea6-4c5b-9c20-474dcf8ae475&sapmAccountPath=/AAA&sapmAccountName=test5@10.20.42.106&responseType=JSON&showUsername=false",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This API allows you to change the password for all Vault Accounts, including both Dynamic and Static types.</p>\n<p>This method gives the secret data of bound Vault account.</p>\n<p>For Application Token accounts which are bound to a single Vault account, the parameters sapmAccountPath and sapmAccountName are not needed.</p>\n<p>For Application Token accounts which are bount to multiple Vault accounts&#x26;groups the user must have set sapmAccountPath and sapmAccountName parameters together with the token.<br>\nresponseType=JSON parameter returns the response as JSON.</p>\n<ul>\n<li>\n<p><strong>Response Format Customization</strong>: By default, the response for dynamic accounts is in plain text. However, you can opt for a JSON response by setting the <code>responseType</code> parameter to <code>JSON</code>.</p>\n<ul>\n<li>\n<p>If this parameter is not set, the return type for dynamic accounts are plain text.</p>\n<ul>\n<li>You can set true<code>prettify</code> parameter and increase readability for JSON response (only for static secret data type config)</li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<p><strong>Username Inclusion</strong>: The API offers the flexibility to either display or hide the username in the response. This is controlled by the <code>showUsername</code> parameter. (only for vault accounts that connected to a device)</p>\n</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "Content-Type",
          "description": "",
          "default": "application/json",
          "value": "application/json",
          "type": "string"
        },
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [
        {
          "name": "passwordExpirationInMinute",
          "description": "",
          "default": "30",
          "value": "30",
          "type": "string"
        },
        {
          "name": "passwordChangeRequired",
          "description": "",
          "default": "TRUE",
          "value": "TRUE",
          "type": "string"
        },
        {
          "name": "comment",
          "description": "",
          "default": "COMMENT",
          "value": "COMMENT",
          "type": "string"
        },
        {
          "name": "token",
          "description": "",
          "default": "ee3a55e7-5ea6-4c5b-9c20-474dcf8ae475",
          "value": "ee3a55e7-5ea6-4c5b-9c20-474dcf8ae475",
          "type": "string"
        },
        {
          "name": "sapmAccountPath",
          "description": "",
          "default": "/AAA",
          "value": "/AAA",
          "type": "string"
        },
        {
          "name": "sapmAccountName",
          "description": "",
          "default": "test5@10.20.42.106",
          "value": "test5@10.20.42.106",
          "type": "string"
        },
        {
          "name": "responseType",
          "description": "",
          "default": "JSON",
          "value": "JSON",
          "type": "string"
        },
        {
          "name": "showUsername",
          "description": "",
          "default": "false",
          "value": "false",
          "type": "string"
        },
        {
          "name": "pin",
          "description": "",
          "default": "PIN",
          "value": "PIN",
          "type": "string"
        },
        {
          "name": "prettify",
          "description": "",
          "default": "false",
          "value": "false",
          "type": "string"
        }
      ],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Application Token Basic",
        "jsonExample": "{\n    \"secret\": {\n        \"password\": \"zHZ4M8qw\"\n    },\n    \"properties\": {\n        \"dbId\": 349813,\n        \"device\": {\n            \"dbId\": 349680,\n            \"name\": \"10.20.42.106\",\n            \"accessProtocol\": \"SSHv2\",\n            \"managementIp\": \"10.20.42.106\"\n        },\n        \"secretName\": \"test5@10.20.42.106\",\n        \"changePeriod\": 10080,\n        \"description\": null,\n        \"secretNotes\": null,\n        \"lastChangeTime\": 1697450626335,\n        \"nextChangeTime\": 1697452431760,\n        \"passwordSeenStatus\": \"SEEN\",\n        \"validationStatus\": \"VALID\",\n        \"parentSapmGroup\": {\n            \"dbId\": 1223807,\n            \"name\": \"AAA\"\n        },\n        \"secretType\": \"DYNAMIC\",\n        \"owner\": {\n            \"id\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n            \"eid\": \"admin\"\n        },\n        \"createdAt\": 1684930878335,\n        \"updatedAt\": 1697450631113,\n        \"approvalStatus\": null,\n        \"groupFullPath\": \"/AAA\",\n        \"approvedBy\": null,\n        \"approvedDate\": null,\n        \"approvalRequired\": false\n    }\n}"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "xFhhsX7HDq5zTxTTNryjm",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url '{{url}}/aioc-rest-web/rest/aapm/request/password?passwordExpirationInMinute=30&passwordChangeRequired=TRUE&comment=COMMENT&token=ee3a55e7-5ea6-4c5b-9c20-474dcf8ae475&sapmAccountPath=%2FAAA&sapmAccountName=test5%4010.20.42.106&responseType=JSON&showUsername=false&passwordExpirationInMinute=30&passwordChangeRequired=TRUE&comment=COMMENT&token=ee3a55e7-5ea6-4c5b-9c20-474dcf8ae475&sapmAccountPath=%2FAAA&sapmAccountName=test5%4010.20.42.106&responseType=JSON&showUsername=false&pin=PIN&prettify=false' \\\n     --header 'accept: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}'"
        },
        {
          "id": "ZetLsrAhvnwIeHT-UG4Sd",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/aapm/request/password?passwordExpirationInMinute=30&passwordChangeRequired=TRUE&comment=COMMENT&token=ee3a55e7-5ea6-4c5b-9c20-474dcf8ae475&sapmAccountPath=/AAA&sapmAccountName=test5@10.20.42.106&responseType=JSON&showUsername=false&passwordExpirationInMinute=30&passwordChangeRequired=TRUE&comment=COMMENT&token=ee3a55e7-5ea6-4c5b-9c20-474dcf8ae475&sapmAccountPath=/AAA&sapmAccountName=test5@10.20.42.106&responseType=JSON&showUsername=false&pin=PIN&prettify=false\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "1ueK5Nj09AlmsoES2IYhU",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/aapm/request/password?passwordExpirationInMinute=30&passwordChangeRequired=TRUE&comment=COMMENT&token=ee3a55e7-5ea6-4c5b-9c20-474dcf8ae475&sapmAccountPath=/AAA&sapmAccountName=test5@10.20.42.106&responseType=JSON&showUsername=false&passwordExpirationInMinute=30&passwordChangeRequired=TRUE&comment=COMMENT&token=ee3a55e7-5ea6-4c5b-9c20-474dcf8ae475&sapmAccountPath=/AAA&sapmAccountName=test5@10.20.42.106&responseType=JSON&showUsername=false&pin=PIN&prettify=false\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "-zWWCvJ6_Y4iW85jYo9_g",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/aapm/request/password?passwordExpirationInMinute=30&passwordChangeRequired=TRUE&comment=COMMENT&token=ee3a55e7-5ea6-4c5b-9c20-474dcf8ae475&sapmAccountPath=/AAA&sapmAccountName=test5@10.20.42.106&responseType=JSON&showUsername=false&passwordExpirationInMinute=30&passwordChangeRequired=TRUE&comment=COMMENT&token=ee3a55e7-5ea6-4c5b-9c20-474dcf8ae475&sapmAccountPath=/AAA&sapmAccountName=test5@10.20.42.106&responseType=JSON&showUsername=false&pin=PIN&prettify=false\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "xFhhsX7HDq5zTxTTNryjm"
    },
    "results": {
      "languages": [
        {
          "id": "RuTQUJXyicWYMWtPu6WeE",
          "language": "200",
          "code": "{\n    \"secret\": {\n        \"password\": \"zHZ4M8qw\"\n    },\n    \"properties\": {\n        \"dbId\": 349813,\n        \"device\": {\n            \"dbId\": 349680,\n            \"name\": \"10.20.42.106\",\n            \"accessProtocol\": \"SSHv2\",\n            \"managementIp\": \"10.20.42.106\"\n        },\n        \"secretName\": \"test5@10.20.42.106\",\n        \"changePeriod\": 10080,\n        \"description\": null,\n        \"secretNotes\": null,\n        \"lastChangeTime\": 1697450626335,\n        \"nextChangeTime\": 1697452431760,\n        \"passwordSeenStatus\": \"SEEN\",\n        \"validationStatus\": \"VALID\",\n        \"parentSapmGroup\": {\n            \"dbId\": 1223807,\n            \"name\": \"AAA\"\n        },\n        \"secretType\": \"DYNAMIC\",\n        \"owner\": {\n            \"id\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n            \"eid\": \"admin\"\n        },\n        \"createdAt\": 1684930878335,\n        \"updatedAt\": 1697450631113,\n        \"approvalStatus\": null,\n        \"groupFullPath\": \"/AAA\",\n        \"approvedBy\": null,\n        \"approvedDate\": null,\n        \"approvalRequired\": false\n    }\n}"
        }
      ],
      "selectedLanguageId": "RuTQUJXyicWYMWtPu6WeE"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}