Records API
CRUD operations for records of any schema.
List records
GET /api/v1/projects/{project}/schemas/{schema}/records
Supports query parameters:
| Param | Example | Effect |
|---|---|---|
page | ?page=2 | 1-indexed page |
pageSize | ?pageSize=50 | items per page (max 100) |
sort | ?sort=data.hp or ?sort=-data.hp | sort ascending/descending |
filter[KEY] | ?filter[data.rarity]=rare | exact match |
filter[KEY][op] | ?filter[data.hp][gte]=50 | comparison (eq, neq, lt, lte, gt, gte, in, contains) |
expand | ?expand=author,tags | inline referenced records |
package | ?package=level-1 | filter to one package |
Get one record
GET /api/v1/projects/{project}/schemas/{schema}/records/{id}
Create a record
POST /api/v1/projects/{project}/schemas/{schema}/records
Content-Type: application/json
{
"package": "level-1",
"data": {
"name": "Goblin",
"hp": 20,
"attack": 3,
"rarity": "common"
}
}
If package is omitted, the record is placed in the project's default package.
Returns the created record with its assigned id, created_at, and updated_at.
Update a record
PATCH /api/v1/projects/{project}/schemas/{schema}/records/{id}
Content-Type: application/json
{ "data": { "hp": 25 } }
Partial — only the fields in the data payload are updated.
To replace the entire record, use PUT with the full record body.
Delete a record
DELETE /api/v1/projects/{project}/schemas/{schema}/records/{id}
Irreversible.
Validation
Field values are validated against the schema's field configs on every write:
requiredfields must be present.numberfields enforcemin,max,step,integer.emailfields validate the email format.referencefields verify the target record exists.selectfields verify the value is in the options list.
A failure returns 422 Unprocessable Entity with a list of field-specific errors.
