Data schemas
Manage JSON data schemas and validate data against them.
A data schema is a named JSON Schema used to validate extracted data.
These endpoints share the pagination and error conventions.
List schemas
/v1/schemasReturns a page of data schemas, most recent first.
- page string
Pagination cursor. See pagination.
- per_page numberdefault: 10
Maximum number of schemas to return.
min: 1max: 100- include_ids string[]
Return only schemas with these IDs.
format: uuid- exclude_ids string[]
Omit schemas with these IDs.
format: uuid- names string[]
Return only schemas with these exact names.
- created_before string
Return only schemas created before this timestamp.
format: date-time- created_after string
Return only schemas created after this timestamp.
format: date-time
curl 'http://localhost:8022/v1/schemas?per_page=20' \
-H 'X-Tenant-Id: acme'Create a schema
/v1/schemasCreates a data schema.
- name stringrequired
A human-readable name for the schema.
minLength: 1maxLength: 255- schema objectrequired
The JSON Schema used to validate data.
- id string
The ID to assign. Generated when omitted.
format: uuid
curl -X POST 'http://localhost:8022/v1/schemas' \
-H 'X-Tenant-Id: acme' \
-H 'Content-Type: application/json' \
-d '{
"name": "article",
"schema": { "type": "object", "properties": { "title": { "type": "string" } } }
}'Get a schema
/v1/schemas/{schema_id}Returns a single data schema by ID. The {schema_id} path segment is the schema's UUID.
curl 'http://localhost:8022/v1/schemas/3f1a…' \
-H 'X-Tenant-Id: acme'Update a schema
/v1/schemas/{schema_id}Updates a data schema. Only the supplied fields are changed; omitted fields are left as they are.
- name string
A new name for the schema.
minLength: 1maxLength: 255- schema object
A replacement JSON Schema.
curl -X PUT 'http://localhost:8022/v1/schemas/3f1a…' \
-H 'X-Tenant-Id: acme' \
-H 'Content-Type: application/json' \
-d '{ "name": "article-v2" }'Delete a schema
/v1/schemas/{schema_id}Deletes a data schema.
curl -X DELETE 'http://localhost:8022/v1/schemas/3f1a…' \
-H 'X-Tenant-Id: acme'Validate data
/v1/schemas/{schema_id}/validateValidates supplied data against a schema.
- data anyrequired
The JSON data to validate.
curl -X POST 'http://localhost:8022/v1/schemas/3f1a…/validate' \
-H 'X-Tenant-Id: acme' \
-H 'Content-Type: application/json' \
-d '{ "data": { "title": "Hello" } }'