Skip to content

Schema Endpoints ​

Dynamic schema introspection endpoints. Return JSON Schemas or TypeScript types describing the API's request/response structures.

These schemas are dynamically generated from the database, including actual book, chapter, issue, template, and field names as enum values.

Routes ​

MethodPathAuthDescription
GET/api/schema/get/collectionBearerQuery schema for collection endpoint
GET/api/schema/get/dataBearerQuery schema for single item
GET/api/schema/get/itemBearerAlias for /schema/get/data
GET/api/schema/delete/collectionBearerDelete query schema for collection
GET/api/schema/delete/dataBearerDelete query schema for item
GET/api/schema/delete/itemBearerAlias for /schema/delete/data
GET/api/schema/patch/dataBearerPatch body schema
GET/api/schema/post/dataBearerPost body schema
GET/api/schema/put/dataBearerPut body schema (single)
GET/api/schema/put/collectionBearerPut body schema (batch array)
POST/api/schema/post/tokenNoneToken request body schema

TypeScript Output ​

Add ?type=ts to any GET schema endpoint to receive TypeScript type definitions instead of JSON Schema:

bash
curl "http://localhost:8080/api/schema/get/collection?type=ts" \
  -H "Authorization: Bearer API_KEY"

Dynamic Enums ​

The collection and data schemas include enum values populated from the database:

  • Books: All book names and IDs
  • Chapters: All chapter names and IDs
  • Issues: All issue names and IDs
  • Templates: All template group names and IDs
  • Fields: Field names in format TemplateName.FieldName

This allows clients to validate query parameters against the actual available values.