Skip to main content

API overview

GET/api/{entityType}List entities
GET/api/{entityType}/{id}Get one entity

Entity routes use the route name exposed by GET /api/entity-types, where isAuthored tells whether an entity type has drafts and publishing, see Drafts and publishing. Lists accept skip, take, sort, query-field filters, relation filters, context selection, relation expansion, and includeMemberships. take is capped at 100. A list answers items, hasMore and continuationToken; pass the token of a page as continuationToken to read the next one, which seeks to where it ended rather than skipping. skip is for interactive paging up to 10,000 entities. includeTotalCount=true also counts every match, in totalCount, which a list leaves out otherwise, since counting a large catalogue is slower than reading a page. See Pages, continuations and budgets. A relation filter lists the entities related to others by any relation of the entity type, in either direction, eg GET /api/products?relation.categories=jackets for the products in the category jackets. The relation's name on the other side is inverseName in its model. See the metadata of an entity type for its filterable and sortable paths. See Querying and search for the query model and consistency behavior.

Reads are consistent: a save publishes the entity with its own calculated values, so a read straight after a save returns what it saved, see Calculations. The calculations of other entities that read it follow in the background.

Rich-text properties are their semantic JSON document by default. Use richTextFormat=Html for canonical HTML and referenceDepth=n for the bounded _projections sidecar of the projections they reference, n levels deep. These options also apply to expanded entities, relation endpoints, and entity projections. See Rich text and entity references.

Mark string or rich-text properties with [VoxSearchable] to include their text in the entity type's search index. Rich text is indexed as visible plain text. Search is a separate endpoint:

GET /api/products/search?search=rain+ja&status=Active

Every complete term must occur, but terms may occur in different searchable properties. The final term is treated as a prefix, so the example can match “rain jacket”. The ordinary filters, contexts, paging, content mode, permissions, relation expansion, and rich-text options still apply. Results are ordered by relevance unless sort is supplied; an explicit sort replaces relevance ordering and makes each hit's score null.

The response contains hits, hasMore and continuationToken, and totalCount with includeTotalCount=true. Each hit contains the entity, its nullable relevance score, and plain-text highlights. Highlight matches are { start, length } UTF-16 ranges within each fragment, so clients do not need to parse markup. Vox returns at most three approximately 150-character fragments per matching field.

Selecting scopes and contexts​

Reads select the authoring scope they read with scope, and the contexts they read in with context:

  • scope=draft reads the draft when one exists and otherwise the published version.
  • scope=release:autumn reads that release's version when one exists and otherwise the published version, and scope=release-draft:autumn the draft within the release, over the release.
  • scope=published reads published content.
  • context=language:sv,market:se selects members of application context types. A context type can have several members, eg context=group:a,group:b. Without a member of a context type, its cells resolve to the baseline.

The scope's version of an entity is composed first, and the contexts are resolved within it, see Drafts and publishing. The draft scopes exist only in an application with authoring, and the release scopes only with its content releases. GET /api/contexts lists the application's context types, and GET /api/contexts/authoring its authoring model. A value of context or key names only application context types, and a name starting with $ is rejected.

Context types selected by criteria or programmatically are selected from the request when it doesn't select them, see Contexts. GET /api/{entityType}/{id}/content returns { published, draft, draftInfo } for one authored entity, in the selected application contexts. It is intended for editors.

Lists and searches in a draft or release are filtered, sorted and counted by published values, and their entities are then read in the draft or release. The entities that only exist there are listed with draft=created.

A request without scope reads the scope of its preview grant, or else its API client's DefaultScope, eg release:autumn, which is useful for a preview deployment, or else published content. An explicit scope, also scope=published, overrides both. An API client's DefaultSelection, in the syntax of context, eg market:se, is overridden by a request's context for the context types it selects. See Drafts and publishing and Content releases.

Entity projections​

Request an entity's default application-facing projection, or select one by name:

GET /api/{entityType}/{id}/projection
GET /api/{entityType}/{id}/projection/{projectionName}

These endpoints accept the same scope and context parameters as entity reads, plus richTextFormat=Html|Json and referenceDepth. They return the projection with the projections it references, materialized by key in projections, 8 levels deep unless referenceDepth asks for fewer. Normal entity read permissions apply, and only projections with AllowContentDelivery = true are available. Evaluation is ephemeral and does not write publication state or dependencies. See Entity projections.

GET /api/entity-projections/schema describes the projections of the model and the references between them, for a delivery system that resolves published references when they're read.

GET /api/entity-projection-publications lists the state of projections that have opted into durable publication, with each publication's sinks: their key, display data, position, pendingSources (how many sources that are due the sink hasn't published yet; a source due later, eg when a price becomes valid tomorrow, counts once it's due), active version, builds and last error.

GET /api/entity-projections/publications/status?entityType=Product&id=p1&version=7 says whether the publications of an entity have published a version of it, eg the one a save returned. A version counts as published once every sink of a publication has it; &sink=algolia-products asks about that sink alone.

Entity assessments​

The assessments of an entity type are in its model in GET /api/entity-types, with their names, context types and the findings and metrics they can report. Lists are filtered by their entities' results, eg ?assessment.Sellability=Fail or ?assessment.Sellability[market]=se, and ?includeAssessments=Sellability adds the results to each entity, in _assessments. GET /api/{entityType}/assessment-summary?assessment=Sellability counts the entities of a list by outcome, state and finding, with the list's filters, grouped in the storage: its number of queries doesn't grow with the number of findings.

The results themselves are also read and reported apart from the entities:

Method and routePurpose
GET /api/assessments/{entityType}/{id}Read every current assessment result for one entity.
GET /api/assessments/{entityType}/{id}/{assessment}Read one named assessment's contextual results.
POST /api/assessments/queryFilter and page results across entities of one type.
PUT /api/assessments/{entityType}/{id}/{assessment}Report one externally owned result.
PUT /api/assessments/{entityType}/{id}/{assessment}/batchReplace its complete context set.
POST /api/assessments/{entityType}/{id}/{assessment}/reassessQueue one evaluated result again.
POST /api/assessments/{entityType}/{assessment}/reassessQueue the assessment for every entity of the type.

Entity reads use the entity's ordinary read permission. Cross-entity queries apply the same read scope before paging and counting. Reporting requires {EntityType}:Assess:{AssessmentName}; manual reevaluation requires vox:Calculations. See Entity assessments.

Creating and updating​

POST/api/{entityType}?scope=draftCreate an entity
POST/api/{entityType}/{id}/actions/{action}?scope=draftRun an update action

scope names where a write is saved: draft, a release, eg release:autumn, a draft within one, or, without it, published content. An API client's default scope never redirects a write. Only an authored entity type is saved in a draft or release; any other entity type is saved immediately, to published content, and a write of it in another scope is rejected. An update body contains the action fields and the numeric version of the entity as it was read where it's saved. An entity without a draft reads as its published version in the draft, so a first draft edit uses that version. A stale version that conflicts with a change of the owned fields returns 409 Conflict. Validation errors return 400 Bad Request with field errors.

A write returns the entity as it's published, with the values its own calculations calculated in the save, eg a new purchase price with its new margin. The next edit is based on its version. A save whose calculation fails saves nothing and returns 422 Unprocessable Content with problem details that name the calculation (calculation, entityType, entityId, address, reason), or 503 Service Unavailable with Retry-After when the failure is transient, eg a timeout while the calculation read another entity. A batch item whose calculation failed has the code CalculationFailed, with calculation and isTransient.

Saving to a release names its scope. For example:

POST /api/products/rain-jacket/actions/SetName?scope=release:autumn

Singleton routes omit /{id}. For example, their action route is POST /api/{entityType}/actions/{action}.

Several update actions can be applied in order and committed as one change:

POST /api/products/rain-jacket/actions
Content-Type: application/json

{
"version": 3,
"actions": [
{ "action": "SetName", "values": { "name": "Rain jacket" } },
{ "action": "SetDescription", "values": { "description": "..." } }
]
}

Validation paths identify the failing action, for example actions[1].description. See Actions, validation and workflows.

Variations​

The cell routes read and change the values of an entity at keys of contexts, each cell with its own version:

Method and routePurpose
GET /api/{entityType}/{id}/cellsRead the published cells, or those of a draft or release with the published ones it doesn't change, as { "cells": [...], "existence": [...] }, with the explicit existence cells at every key.
PUT /api/{entityType}/{id}/cellsWrite a cell, { "keys": ["Market=se"], "values": { ... }, "links": { ... }, "version": 4 }, to published content, or with scope to a draft or a release.
DELETE /api/{entityType}/{id}/cells?keys=Market=se&version=4Delete a cell, or hide a published one in a draft.
POST /api/{entityType}/{id}/cells/resolve-conflict?scope=draftKeep the values of a conflicting cell in a draft or release, or use those of its parent scope.

The keys of a cell name application contexts only, and the cells are read and written in the request's scope.

Singleton routes omit /{id}. A new cell is written with version 0. Restoring a version of the entity restores its cells. Cell values use the same sensitive-field redaction as the properties they set. See Variations.

Existence in contexts​

The existence route writes whether an entity is a member of a context, for the context types its entity type is declared a member of:

Method and routePurpose
PUT /api/{entityType}/{id}/existence/{contextType}/{contextId}Write { "exists": true } or false in the scope, eg draft, at the key of other contexts if any, eg Language=sv for Swedish, or null to remove the cell: in published content the entity inherits its membership again, and in a draft or release it has the published one.

The explicit existence cells are read with the cells, in existence of GET /api/{entityType}/{id}/cells: each with its context type, member, the other contexts of its key, eg Language=sv, its value, whether the draft or release changes it, and inheritedIsMember, the existence the entity has there without it. The memberships an entity has in the selection are in _memberships with includeMemberships.

Drafts and the items of releases list their existence and link changes in changedExistence, eg { "key": "Market=se", "contextType": "Market", "contextId": "se", "exists": false }, and changedRelations, the names of the index-backed relations they change. Neither conflicts. See Languages, markets and channels.

Draft lifecycle​

These routes exist only in an application with authoring, and apply to authored entity types. The following routes also omit /{id} for a singleton:

Method and routePurpose
POST /api/{entityType}/{id}/publish?version=4Publish the current draft now.
POST /api/{entityType}/{id}/schedule-publishSchedule it; body: { "version": 4, "publishAtUtc": "...Z" }, with restoreAtUtc to undo its changes again at a time.
POST /api/{entityType}/{id}/unschedule-publish?version=4Cancel its schedule.
POST /api/{entityType}/{id}/revert-draft?version=4Discard the draft.
POST /api/{entityType}/{id}/resolve-conflict?scope=draftResolve the conflict in a scope, eg the draft or a release, with the fields that take the values of its parent scope.
POST /api/{entityType}/{id}/unpublish?version=5Move published content back to draft-only.
GET /api/{entityType}/{id}/publicationsThe kept publications of its drafts, with their scheduled restores.
POST /api/{entityType}/{id}/publications/{publicationId}/schedule-restoreSchedule or unschedule a restore; body: { "restoreAtUtc": "...Z" } or null.
POST /api/{entityType}/{id}/publications/{publicationId}/restoreUndo the changes of a publication now.
DELETE /api/{entityType}/{id}?version=4&scope=draftDelete it in a scope, eg the draft or a release, which deletes it when that's published. Deleting a published entity deletes its draft, release versions and every cell too.
GET /api/{entityType}/{id}/explainWhere each value comes from in the selection: the winning cell, rule or fallback.

The publish, revert and resolve routes take scope, the draft by default, eg scope=release-draft:autumn for a draft within a release, which is merged into the release.

Effects and dependencies​

These routes read how an entity takes part in calculations, from what the processing stored; none of them calculates, saves or queues anything. They take the scope in scope, eg scope=draft, and compare it with published content, or with the release for a draft within a release. The contexts of the request don't narrow them: readers and differences are found at every address they were stored at, eg the general value and Market=se. Lists are pages with a continuation, and a page inspects a bounded number of readers, so it can be empty and still continue. Responses are private, and show only what the principal may read.

Method and routePurpose
GET /api/{entityType}/{id}/effects?scope=draftWhat differs in the entity, at a page of its addresses, and what's known about the processing of its changes: readers still being found, outputs still to be applied and failed calculations. producers names the calculations of other entities that create it or calculate its fields there.
GET /api/{entityType}/{id}/effects/outputs?scope=draftA page of the entities its calculations create or calculate fields of in the scope, each with its outputs' state (pending, applied or dropped with the reason) and, outside published content, its differences.
GET /api/{entityType}/{id}/effects/readers?scope=draft&view=differsA page of the entities that read what differs in it directly, with their stored differences and a capped count of their own readers; path lists the readers of one field, * of the whole entity.
GET /api/{entityType}/{id}/effects/has-readers?scope=draftWhether its saved changes have readers: readers, none or unknown, and whether they're still being dispatched. With counts=true, also how far each changed field reaches, eg 1,000+ products. hasOutputs is true when its calculations create or calculate other entities there, which counts as readers.
GET /api/{entityType}/{id}/effects/has-incomingWhether another draft or release changes its calculated values, from a bounded probe that compares at most two of the scopes it has calculated results in.
GET /api/{entityType}/{id}/effects/incomingThe drafts and releases where its calculated values differ because something it reads changed there, not those where it's edited itself.
GET /api/content-releases/{id}/effectsA page of what a release edits and the entities whose calculated values differ because of it, with change, entityType, field and calculation filters, or its drafts with drafts=true. An entity a calculation proposes there is isCalculatedCreation, not a release item.

Singleton effects routes omit /{id}, for example GET /api/website-policy/effects/readers?scope=draft. An ID on a singleton effects route, or a missing ID for another entity type, returns 400.

See Effects of drafts and releases.

Publishing operations, including writes of an authored entity type to published content, require {EntityType}:Publish. A caller also needs the ordinary create, edit, action, or delete permission for the command it runs.

Content releases​

Releases exist only in an application with authoring that hasn't left them out. They're entities at api/vox-content-releases: they're created, listed, read, edited and deleted like any entity, and their lifecycle fields are read-only.

Method and routePurpose
GET /api/content-releases?entityType=Product&entityId=1042The releases with a change of an entity.
GET /api/content-releases/item-counts?id=autumn&id=springThe number of items of releases.
GET /api/content-releases/{id}/itemsList changed entities and conflicts.
POST /api/content-releases/{id}/publish?version=4Atomically publish every item.
POST /api/content-releases/{id}/scheduleSchedule it with { "version": 4, "publishAtUtc": "...Z", "revertAtUtc": null }.
POST /api/content-releases/{id}/unschedule?version=4Cancel its schedule.
POST /api/content-releases/{id}/revert?version=5Undo the changes of a published release.
POST /api/content-releases/{id}/schedule-revertRevert it at a time, with { "version": 5, "revertAtUtc": "...Z" }.
POST /api/content-releases/{id}/unschedule-revert?version=5Cancel its scheduled revert.
POST /api/content-releases/{id}/items/{type}/{entityId}Copy a published version or ordinary draft into it.
DELETE /api/content-releases/{id}/items/{type}/{entityId}Remove and discard one release version.

Release management requires vox:ContentReleases; publication also checks every represented entity type's publish permission. See Content releases.

Context types and promotion​

Method and routePurpose
GET /api/contextsThe application's context types in stacking order, with their members and traits: permission, selection, portability and concurrency.
GET /api/contexts/authoringThe authoring model: whether there are drafts and releases, whether they're edited here, and their sources.
GET /api/contexts/authoring/descriptorThe authoring descriptor: drafts, releases, their authority and the open releases, see Portable contexts.
GET /api/contexts/manifestThe context manifest, see Portable contexts.
POST /api/contexts/selectThe members that criteria and selectors select for a sample input, eg a host and headers.
GET /api/contexts/{contextType}/{member}/itemsThe entities with cells at a member, eg an experiment's variant, which a promotion writes.
POST /api/contexts/{contextType}/{member}/promote?version=3Promote the member into what it varies atomically, and delete it.

Imports​

Post a full external entity to /api/{entityType}/import, or a source-specific import DTO to /api/{entityType}/import/{importName}. A body may contain one import or a non-empty array. Nothing is enqueued if any import is invalid, which is a 400 Bad Request.

Imports are asynchronous: the response is an empty 202 Accepted as soon as the imports are durably queued, and there's no option to wait for them. Nexus keeps the history of each queued message. An imported change is published with its calculated values when its import is processed, like any other write; see Calculations. To act on the result, subscribe to the entity's events, which are sent once per published change, rather than polling. See Import data from another system.

Model and integration metadata​

The API exposes the active entity types with their editor metadata, actions, contexts, calculations, assessments, subscriptions, contracts and the applied model, and the fields of field sets on demand. The definitions of attributes and their templates are data, at /api/attributes, searched and paged, with their changes and history; an entity type's attribute values describe their fields on demand like a field set, labelled in the languages the request names. Its OpenAPI document can expand the generic entity endpoints into concrete paths and schemas for every registered entity type, action and import.

This allows clients and AI tools to discover a particular Vox application's domain contract without referencing its entity assemblies. Several purpose-built applications can therefore share one authoritative model and mutation contract rather than generating their own incompatible interpretations. See Build a UI with AI on top of Vox and Events and subscriptions.

The metadata of the entity types, GET /api/entity-types, describes every entity type with its fields, actions and presentation, so it grows with the model: about 11 KB per list of choices, eg some 6 MB for a catalog with hundreds of lists of choices. Its presentation includes the signed-in person's own changes of the admin UI, as do /api/navigation and the fields of field values; entity reads and every other endpoint use code. The admin UI reads it once and keeps it until something changes it. It's repetitive JSON that compresses about ten times, so compress the responses of the application, eg with ASP.NET's AddResponseCompression and UseResponseCompression. Whether to compress over HTTPS is the application's choice, see BREACH.

Authentication​

The Vox API accepts signed-in user bearer tokens and API keys. An API key uses Authorization: ApiKey {clientId}.{secret}. Its roles determine permissions and its API-client entity determines the default content mode. An unauthenticated request receives 401; an authenticated principal without permission receives 403.

For an entity type whose /api/entity-types metadata has isSingleton: true, the first route returns the entity itself rather than a list and the ID route is not available. Its update actions, deletion, history, and relations also omit the entity ID. See Singleton entities.