What it does
A view is a named, versioned projection over one collection: typed fields, renames, hidden fields and relation references. Each change that is compatible appends a new immutable version; a breaking change is refused with a stable error code. Views refuse writes unless they opt in, and they never bypass the source collection's access rules.
How it works
POST /v1/views creates a view or appends a version. The server compares the candidate with the current version using a compatibility check: adding an optional field is compatible; changing the source collection, narrowing a writable view so that it refuses writes, making an optional field required or changing a relation target is breaking. A breaking change is rejected with a stable error code, and an unchanged shape does not append a version. Concurrent appends use compare-and-set, so no update is lost.
POST /v1/views/{name}/migration-preview returns a report, which changes nothing, of what a candidate version would break, computed over just the records the caller is allowed to see. Reading through a view projects the declared visible fields, emits null for a declared field the record lacks, and turns relation fields into resolvable references. Hiding a field masks it in every historical version.
A view cannot widen access. Reads apply the source collection's row-level policy and field visibility before the limit is applied, and writes through a view are refused unless the view opted in. Defining or changing a view needs an administrative credential, and definitions are not disclosed to other callers.
View definitions and their full version history live in the log, so they survive restarts, and views and their records are scoped to the calling project.
Where you reach it
- HTTP
GET, POST /v1/views; GET, DELETE /v1/views/{name}; GET /v1/views/{name}/versions - HTTP
POST /v1/views/{name}/migration-preview - HTTP
GET, POST /v1/views/{name}/records; GET /v1/views/{name}/records/{id}
Limits
- A view has one source collection; relation fields project as references to other records.
- Views are not materialised. Each read projects the source records at read time.
- The compatibility check classifies shape changes. It does not migrate stored data.
Evidence
- On this siteHTTP API reference
- TestsCovered in the engine repository by 21 schema-level view tests (compatibility rules, history, row-level policy and visibility, compare-and-set appends) and 17 HTTP tests (project isolation, hidden fields, restart survival, administrative credentials, migration preview)
Test coverage is listed as present in the engine repository at this edition. This page does not report test results.
KynetraDB is in private preview
Request a preview to try this against your own workload.