JSON:API Reference
LaikaCMS exposes its content over HTTP as JSON:API v1.1 servers. This section documents every endpoint, grouped by API server.
- Storage API — low-level key/value atom and folder storage
- Documents API — versioned content with a publish/unpublish lifecycle
- Assets API — binary file and folder management
- ContentBase API — collection settings
- Error Responses — shared error format and codes
Overview
LaikaCMS exposes three HTTP API servers, each following the JSON:API v1.1 specification. All responses use the application/vnd.api+json content type.
| Server | Default Base Path | Purpose |
|---|---|---|
| Storage API | configurable | Low-level key/value atom and folder storage |
| Documents API | configurable | Versioned content with publish/unpublish lifecycle |
| Assets API | /api/assets | Binary file and folder management |
| ContentBase API | configurable | Collection settings (document and media folders) |
JSON:API Conventions
- Single resources are returned as
{ "data": { ... } }. - Collections are returned as
{ "data": [ ... ], "links": { ... }, "meta": { "page": { ... } } }. - Errors are returned as
{ "errors": [ { "status", "code", "detail" } ] }. - The Documents API
/operationsendpoint is a fail-fast batch (not a JSON:API Atomic Operations extension): request body is{ "operations": [ ... ] }, response is{ "results": [ ... ] }. Pre-flight validates all ops before any I/O; a shape-invalid batch returns 400 with zero writes. A mid-batch repository failure stops processing but does not roll back prior ops. - Cursor-based pagination is controlled with
page[after](forward) /page[before](backward) andpage[size]query parameters. Offset-based pagination usespage[offset]andpage[limit]. Cursor pagination is backend-specific. Not all storage backends supportpage[after]/page[before]; backends likeFileSystemStorageRepositoryandR2StorageRepositoryonly support offset- and page-based pagination. Sending a cursor param to an unsupported backend returns a400 Bad Requestwith ainvalid_dataerror. InspectGET /capabilities(attributes.pagination.styles.cursor) to confirm cursor support before using these params. Page size is capped at 100.page[size]/page[limit]values above 100 are silently clamped to 100 — the request succeeds but fewer items are returned. The response pagination links will reflect the clamped value.