Schemas API
Read-only access to schema definitions.
List schemas
GET /api/v1/apps/:app_slug/schemas
Returns all schemas.
Response
[
{
"title": "Blog Posts",
"slug": "blog-posts",
"storage": "directory",
"kind": "collection",
"schema": { ... }
},
{
"title": "Site Settings",
"slug": "site-settings",
"storage": "directory",
"kind": "single",
"schema": { ... }
}
]
Each object includes the full JSON Schema document in the schema field.
Example
curl -H "Authorization: Bearer $TOKEN" \
http://localhost:3000/api/v1/apps/my-app/schemas
Get a schema
GET /api/v1/apps/:app_slug/schemas/:slug
Returns the full JSON Schema document for a single schema.
Response
{
"x-substrukt": {
"title": "Blog Posts",
"slug": "blog-posts",
"storage": "directory"
},
"type": "object",
"properties": {
"title": { "type": "string", "title": "Title" },
"body": { "type": "string", "format": "textarea" }
},
"required": ["title"]
}
Example
curl -H "Authorization: Bearer $TOKEN" \
http://localhost:3000/api/v1/apps/my-app/schemas/blog-posts
Returns 404 if the schema does not exist.