inndx
GitHub

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

GET/v1/schemas

Returns a page of data schemas, most recent first.

Query parametersin: query
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
Responses

curl 'http://localhost:8022/v1/schemas?per_page=20' \
  -H 'X-Tenant-Id: acme'

Create a schema

POST/v1/schemas

Creates a data schema.

Request bodyin: body
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
Responses

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

GET/v1/schemas/{schema_id}

Returns a single data schema by ID. The {schema_id} path segment is the schema's UUID.

Responses

curl 'http://localhost:8022/v1/schemas/3f1a…' \
  -H 'X-Tenant-Id: acme'

Update a schema

PUT/v1/schemas/{schema_id}

Updates a data schema. Only the supplied fields are changed; omitted fields are left as they are.

Request bodyin: body
name
string

A new name for the schema.

minLength: 1maxLength: 255
schema
object

A replacement JSON Schema.

Responses

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

DELETE/v1/schemas/{schema_id}

Deletes a data schema.

Responses

curl -X DELETE 'http://localhost:8022/v1/schemas/3f1a…' \
  -H 'X-Tenant-Id: acme'

Validate data

POST/v1/schemas/{schema_id}/validate

Validates supplied data against a schema.

Request bodyin: body
data
anyrequired

The JSON data to validate.

Responses

curl -X POST 'http://localhost:8022/v1/schemas/3f1a…/validate' \
  -H 'X-Tenant-Id: acme' \
  -H 'Content-Type: application/json' \
  -d '{ "data": { "title": "Hello" } }'

Search docs

Search the Self-host documentation