Docs

List all schemas

GET
/schemas

Retrieve a list of all schemas available in the system. This endpoint supports pagination and filtering based on schema attributes.

Authorization

headerAuthorizationBearer <token>

Scope: schema.read

Query Parameters

project_id*string

The unique identifier of the project

Match^[a-zA-Z0-9_-]+$
limit?integer

Maximum number of items to return.

Range1 <= value <= 100
Default20
page_token?string

Token for fetching the next page of results. Obtain this value from next_page_token in the previous response. Omit to start from the beginning. Its format is opaque and may change between releases.

object_type?string

The type of object of the schema to filter by.

Lengthlength <= 256
revisions?string

Which revisions to return. Schemas are immutable and versioned by URL, so editing one mints a new row sharing its objectType.

all (the default) returns every revision — the full history an export, an audit or a GitOps diff needs. latest returns the newest revision of each objectType, which is one row per schema.

A schema stored without an objectType is a revision of nothing, and is returned by both.

A page_token is bound to the mode it was issued in and is rejected by the other.

Default"all"
Value in"all""latest"
kind?"user-schema"

The kind of schema to filter by, read from the stored document's kind property.

schema-url is not a kind: it discriminates the create request body, not a stored schema. A schema registered by URL is stored as whatever document the URL served, and declares its own kind.

A schema stored without its document being parsed has no kind that could be read, and is excluded from every filtered result.

Value in"user-schema"
expand?array<>

Extra fields to add onto each returned schema.

Response Body

A list of schemas was retrieved successfully.

application/json
  1. response

List of schemas, newest first.

schemas*array<>
next_page_token?|

Token to pass as page_token in the next request to fetch the following page. Absent when there are no more results.

Example Request
import { configureZitadel, getApi } from "@zitadel/api/config";// In the browser, through the SDK proxy: the session cookie authenticates the call.const client = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));const schemas = await client.listSchemas({ project_id: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" });
Example Response
{  "schemas": [    {      "id": "string",      "schema": {        "$schema": "https://json-schema.org/draft/2020-12/schema",        "objectType": "string",        "kind": "user-schema",        "metaSchema": "http://example.com",        "x-auth-methods": {          "password": {            "enabled": true          },          "passkey": {            "enabled": true          },          "magic_link": {            "enabled": true          },          "sso": {            "providers": [              "google"            ],            "enabled": true          },          "otp": {            "enabled": true          }        },        "x-identifier": "string",        "x-display": [          "string"        ],        "properties": {          "property1": {            "x-unique": "unspecified",            "x-claim": "string",            "x-audit": false,            "properties": {              "property1": {},              "property2": {}            }          },          "property2": {            "x-unique": "unspecified",            "x-claim": "string",            "x-audit": false,            "properties": {              "property1": {},              "property2": {}            }          }        }      },      "metadata": {        "created_at": "2019-08-24T14:15:22Z",        "in_use": true      }    }  ],  "next_page_token": "string"}

Was this helpful?