---
title: Query for schemas
slug: opti-id/api/query-for-schemas
docTags: 
createdAt: 2026-10-01T19:58:50.958Z
---

{
  "id": "2RumP_YhVRAxeU3dLym7r",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://identity-api.optimizely.com/api/scim/v2/schemas",
    "servers": [
      {
        "url": "https://identity-api.optimizely.com/api/scim/v2/schemas"
      }
    ],
    "name": "Query for schemas",
    "description": "Retrieves information about resource schemas supported by a SCIM service provider.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiToken_auth",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "List Response of Schemas",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "queryResponse_typeScheme",
            "schema": [
              {
                "name": "itemsPerPage",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "resources",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/typeScheme",
                "customType": "typeScheme[]",
                "schema": [
                  {
                    "name": "attributes",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/attributeScheme",
                    "customType": "attributeScheme[]",
                    "schema": [
                      {
                        "name": "caseExact",
                        "kind": "optional",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "dataType",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "",
                        "default": 0,
                        "format": "int32",
                        "enum": [
                          "0",
                          "1",
                          "2",
                          "3",
                          "4",
                          "5",
                          "6",
                          "7"
                        ]
                      },
                      {
                        "name": "description",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "mutability",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "",
                        "default": 0,
                        "format": "int32",
                        "enum": [
                          "0",
                          "1",
                          "2",
                          "3"
                        ]
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "multiValued",
                        "kind": "optional",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "required",
                        "kind": "optional",
                        "type": "boolean",
                        "description": ""
                      },
                      {
                        "name": "returned",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "",
                        "default": 0,
                        "format": "int32",
                        "enum": [
                          "0",
                          "1",
                          "2",
                          "3"
                        ]
                      },
                      {
                        "name": "uniqueness",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "",
                        "default": 0,
                        "format": "int32",
                        "enum": [
                          "0",
                          "1",
                          "2"
                        ]
                      },
                      {
                        "name": "subAttributes",
                        "kind": "optional",
                        "type": "array",
                        "description": "",
                        "modelRef": "#/components/schemas/attributeScheme",
                        "customType": "attributeScheme[]",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Circular-Reference"
                          }
                        ]
                      },
                      {
                        "name": "canonicalValues",
                        "kind": "optional",
                        "type": "array",
                        "description": "",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      },
                      {
                        "name": "referenceTypes",
                        "kind": "optional",
                        "type": "array",
                        "description": "",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      }
                    ]
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "meta",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/core2Metadata",
                    "customType": "core2Metadata",
                    "schema": [
                      {
                        "name": "resourceType",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "created",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "",
                        "format": "date-time"
                      },
                      {
                        "name": "lastModified",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "",
                        "format": "date-time"
                      },
                      {
                        "name": "version",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "location",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "externalId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "schemas",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "startIndex",
                "kind": "optional",
                "type": "integer<int32>",
                "nullable": true,
                "description": "",
                "format": "int32"
              },
              {
                "name": "totalResults",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "schemas",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/queryResponse_typeScheme",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized access to endpoint.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "<p>A server error occurred, please try again.</p>",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "5Xpj9stFQyh6uEw7C7ati",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://identity-api.optimizely.com/api/scim/v2/schemas \\\n     --header 'accept: application/json'"
        },
        {
          "id": "8Oov3WPkxrm0qPtS007Cn",
          "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(\"https://identity-api.optimizely.com/api/scim/v2/schemas\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "M_SZjKkOIETvSxvCdv7H2",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://identity-api.optimizely.com/api/scim/v2/schemas\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "meJo9aA6i-tBNfof89-TG",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://identity-api.optimizely.com/api/scim/v2/schemas\"\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": "5Xpj9stFQyh6uEw7C7ati"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// List Response of Schemas\n{\n  \"itemsPerPage\": \"\",\n  \"resources\": [\n    {\n      \"attributes\": [\n        {\n          \"caseExact\": false,\n          \"dataType\": \"\",\n          \"description\": \"\",\n          \"mutability\": \"\",\n          \"name\": \"\",\n          \"multiValued\": false,\n          \"required\": false,\n          \"returned\": \"\",\n          \"uniqueness\": \"\",\n          \"subAttributes\": [\n            {\n              \"\": \"\"\n            }\n          ],\n          \"canonicalValues\": [\n            \"\"\n          ],\n          \"referenceTypes\": [\n            \"\"\n          ]\n        }\n      ],\n      \"name\": \"\",\n      \"description\": \"\",\n      \"meta\": {\n        \"resourceType\": \"\",\n        \"created\": \"\",\n        \"lastModified\": \"\",\n        \"version\": \"\",\n        \"location\": \"\"\n      },\n      \"externalId\": \"\",\n      \"id\": \"\",\n      \"schemas\": [\n        \"\"\n      ]\n    }\n  ],\n  \"startIndex\": \"\",\n  \"totalResults\": \"\",\n  \"schemas\": [\n    \"\"\n  ]\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Unauthorized access to endpoint.\n"
        },
        {
          "id": "response-2-500",
          "language": "500",
          "code": "// A server error occurred, please try again.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}