Schema

Define validation rules and structure for ledger records.

A schema defines validation rules for ledger records using JSON Schema format. Schemas enforce constraints on the custom and data fields of records at creation and update time.

Schema enforcement activates per resource type after the first schema is created for that type. Before that, records of that type are untyped and accept any structure. Once a schema exists, all new records of that type must reference a valid schema.

Existing untyped records are not affected until their next update — at that point they must conform to a valid schema or the update is rejected.

Endpoints

MethodPathDescription
POST/schemasDefine a new validation schema to enforce rules on ledger records.
GET/schemasQuery schemas with filtering, sorting, and pagination.
GET/schemas/{id}Retrieve a schema by its handle or LUID.
PUT/schemas/{id}Submit a new version of a schema.
POST/schemas/{id}/proofsSubmit a signed proof to a schema record.

Access & History

MethodPathDescription
POST/schemas/{id}/access/!checkEvaluate what actions a signer can perform on this schema.
GET/schemas/{id}/changesRetrieve the change history of a schema by its handle or LUID.
GET/schemas/{id}/changes/{change}Retrieve a change record for a schema by handle or LUID and change number.

On this page