---
title: List SAPM Accounts Bound to the AAPM Account
slug: single-connect-api-3-0-3/list-sapm-accounts-bound-to-the-aapm-account
description: Learn how to make a GET request with curl and a specified token. This document offers a code example that includes headers for JSON data acceptance and sending, along with a raw data payload in the JSON format. Improve your understanding and implementatio
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "Qw678c014oRJMgCnxw7Hc",
  "data": {
    "url": "{{url}}/sc-aapm-ui/rest/aapm/listSAPMAccounts?token=TOKEN",
    "method": "GET",
    "request": {
      "pathParameters": [],
      "queryParameters": [
        {
          "name": "token",
          "type": "string",
          "example": "TOKEN",
          "description": "AAPM token"
        }
      ],
      "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": "This method lists the SAPM accounts that are bound to the AAPM account. The checkbox of \"Allow Listing Accounts\" in GUI should be checked for an account to let this method return a response.",
    "examples": {
      "languages": [
        {
          "id": "M1jTRFaksHZPALKV9H5o6",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url '{{url}}/sc-aapm-ui/rest/aapm/listSAPMAccounts?token=TOKEN' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "XoZa8k-vmiWrm_nLg9Iml",
          "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/listSAPMAccounts?token=TOKEN\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "E67Hp0uZ2vtAC42_hhRxD",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/sc-aapm-ui/rest/aapm/listSAPMAccounts?token=TOKEN\")\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": "Cz1nSsjk12zsU79rIcw06",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/sc-aapm-ui/rest/aapm/listSAPMAccounts?token=TOKEN\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "M1jTRFaksHZPALKV9H5o6"
    },
    "results": {
      "languages": [
        {
          "id": "pEKfyz5cdEwHenGERNNoe",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "pEKfyz5cdEwHenGERNNoe"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}