---
title: List All SAPM Configs
slug: single-connect-api-3-2-0/list-all-sapm-configs
description: Learn how to make a GET request using the curl command and specify both the endpoint and headers in this code example. Improve your API handling skills and enhance your understanding of curl command usage.
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "-FjQ6zuGMq4y-ZPqC3L0S",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sapm/listSapmConfigs",
    "method": "GET",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "You can list all SAPM configs with this API. It will return information about all configs.",
    "examples": {
      "languages": [
        {
          "id": "Vv9nPIe0t1YEeZROTjR97",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url {{url}}/aioc-rest-web/rest/sc/sapm/listSapmConfigs \\\n     --header 'accept: application/json'"
        },
        {
          "id": "sF_v6Jfzaa-LsQNgOjw61",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sapm/listSapmConfigs\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "0TtYrNl9x_7sHlsLI8ia2",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sapm/listSapmConfigs\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Tk1K3sXG7U88IevJgOOxA",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sapm/listSapmConfigs\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Vv9nPIe0t1YEeZROTjR97"
    },
    "results": {
      "languages": [
        {
          "id": "y0CB5M3KUeKFJx9V--WHh",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "y0CB5M3KUeKFJx9V--WHh"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}