---
title: Get SiteDefinitionModel of current request
slug: cms-12/api/D_IC-get-sitedefinitionmodel-of-current-request
docTags: 
createdAt: 2026-08-28T13:16:06.833Z
---

{
  "id": "NoIbIvg5Tm7rfYfnz9b5w",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "http://localhost:65349//api/episerver/v2.0/site",
    "servers": [
      {
        "url": "http://localhost:65349//api/episerver/v2.0/site"
      }
    ],
    "name": "Get SiteDefinitionModel of current request",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "text/json",
            "application/xml",
            "text/xml"
          ],
          "default": "application/json"
        },
        {
          "kind": "optional",
          "name": "Accept-Language",
          "type": "string",
          "description": "<p>Determines in which language the content should be retrieved. Example: 'en' or 'sv'</p>"
        },
        {
          "kind": "required",
          "name": "Authorization",
          "type": "string",
          "description": "<p>It should be in the format 'Bearer your_token', where 'your_token' is the token provided after authorization to access API. Note that there should be a space between 'Bearer' and 'your_token'.</p>"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "",
            "customType": "SiteDefinitionModel[]",
            "schema": [
              {
                "name": "Name",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "Id",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "example": "00000000-0000-0000-0000-000000000000",
                "format": "uuid"
              },
              {
                "name": "EditLocation",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "ContentRoots",
                "kind": "optional",
                "type": "map",
                "description": "",
                "example": "",
                "customType": "map<string, ContentModelReference>",
                "schema": []
              },
              {
                "name": "Languages",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/SiteDefinitionLanguageModel",
                "customType": "SiteDefinitionLanguageModel[]",
                "schema": [
                  {
                    "name": "IsMasterLanguage",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "UrlSegment",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "Url",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "DisplayName",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "Name",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  }
                ]
              },
              {
                "name": "Hosts",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/HostDefinitionModel",
                "customType": "HostDefinitionModel[]",
                "schema": [
                  {
                    "name": "Name",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "Type",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "Language",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/LanguageModel",
                    "customType": "LanguageModel",
                    "schema": [
                      {
                        "name": "DisplayName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "Name",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/SiteDefinitionModel",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "nmZWJntn87VbbQpee9Cye",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url http://localhost:65349//api/episerver/v2.0/site \\\n     --header 'accept: application/json' \\\n     --header 'authorization: string'"
        },
        {
          "id": "zxbeIdPELfgK-ocXheIGS",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"authorization\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost:65349//api/episerver/v2.0/site\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "le1ZK2AkaZwkiKOjSluKD",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:65349//api/episerver/v2.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\"\nrequest[\"authorization\"] = \"string\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "-qv4koY9DlmgGHTQiGfVD",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:65349//api/episerver/v2.0/site\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'authorization': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "nmZWJntn87VbbQpee9Cye"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"Name\": \"\",\n    \"Id\": \"00000000-0000-0000-0000-000000000000\",\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-400",
          "language": "400",
          "code": "// Bad Request\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Not Found\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}