---
title: Get a list of sites.
slug: cms-12/api/LKMQ-get-a-list-of-sites
docTags: 
createdAt: 2026-08-28T13:16:06.833Z
---

{
  "id": "3QktoieBMJ3AEsmihM8i5",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/api/episerver/v3.0/site",
    "servers": [],
    "name": "Get a list of sites.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "application/problem+json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Success",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "",
            "customType": "siteDefinition[]",
            "schema": [
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": ""
              },
              {
                "name": "id",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              },
              {
                "name": "editLocation",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": ""
              },
              {
                "name": "contentRoots",
                "kind": "optional",
                "type": "map",
                "nullable": true,
                "description": "",
                "example": "",
                "customType": "map<string, contentReference>",
                "schema": []
              },
              {
                "name": "languages",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "",
                "modelRef": "#/components/schemas/siteDefinitionLanguage",
                "customType": "siteDefinitionLanguage[]",
                "schema": [
                  {
                    "name": "isMasterLanguage",
                    "kind": "optional",
                    "type": "boolean",
                    "nullable": true,
                    "description": ""
                  },
                  {
                    "name": "urlSegment",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  },
                  {
                    "name": "url",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  },
                  {
                    "name": "displayName",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  }
                ]
              },
              {
                "name": "hosts",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "",
                "modelRef": "#/components/schemas/hostDefinition",
                "customType": "hostDefinition[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  },
                  {
                    "name": "language",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/language",
                    "customType": "language",
                    "schema": [
                      {
                        "name": "displayName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": ""
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/siteDefinition",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "kvIsNbkLrpZ58CKg9IqG2",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url /api/episerver/v3.0/site \\\n     --header 'accept: application/json'"
        },
        {
          "id": "9I5m9CPx7O2oTf6mvE-sQ",
          "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(\"/api/episerver/v3.0/site\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "k7oPxdDF0ycSxSG-cKNmj",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/api/episerver/v3.0/site\")\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": "LY2e_RCQSgFbltfGGrI86",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/api/episerver/v3.0/site\"\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": "kvIsNbkLrpZ58CKg9IqG2"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Success\n[\n  {\n    \"name\": \"\",\n    \"id\": \"\",\n    \"editLocation\": \"\",\n    \"contentRoots\": \"\",\n    \"languages\": [\n      {\n        \"isMasterLanguage\": false,\n        \"urlSegment\": \"\",\n        \"url\": \"\",\n        \"displayName\": \"\",\n        \"name\": \"\"\n      }\n    ],\n    \"hosts\": [\n      {\n        \"name\": \"\",\n        \"type\": \"\",\n        \"language\": {\n          \"displayName\": \"\",\n          \"name\": \"\"\n        }\n      }\n    ]\n  }\n]"
        },
        {
          "id": "response-1-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// Not Found\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}