REST API#
Every route is under /vector, in the vector middleware group,
except hosted mode’s page under /vector/ui, which is in the
vector-shell group (Authentication). The API is the authority:
the UI and the MCP tools are clients of it, and anything they do, a
script can do.
The descriptor GET /vector/schema publishes validates against the JSON
schema the package ships, resources/schema/descriptor.schema.json
(vendor/kinetis/vector/resources/schema/descriptor.schema.json in an
application).
Routes#
Route |
Answers |
|---|---|
|
The descriptor for this user, with an |
|
This API as an OpenAPI 3.1 document, for this user, where |
|
The authenticated identity. |
|
A page of records under the list grammar. |
|
The same list as a CSV file; a job above the export limit. |
|
One record and this user’s permissions on it. |
|
Creates a record: |
|
Updates the fields sent. |
|
Deletes, or trashes on a soft-deleting resource ( |
|
Takes a record out of the trash. |
|
|
|
Inline edits: |
|
Runs an action on |
|
A page of a collection’s records. |
|
A relationship repeater’s current rows, in their order. |
|
|
|
Choices for a relation input, each |
|
Stores one file (multipart |
|
The record’s stored file. |
|
The audit across resources, cursor-paged, where the application’s audit policy lets this user browse it (below). |
|
The record’s audit: its newest 100 entries, and |
|
Reverts one update; |
|
A resource widget’s data. |
|
CSV import: a preview with a suggested mapping, then the queued import. |
|
Menu badges by resource. |
|
Global search. |
|
A dashboard, and one card’s data. |
|
Saved views. |
|
Per-user preferences; |
|
Settings groups. |
|
This user’s jobs and their files. |
|
The inbox. |
|
Impersonation. |
|
The queue dashboard’s watched queues, and what the caller may do there (Queue dashboard). Only where queues are configured and the policy lets the caller view. |
|
Failed jobs, a cursor-paged list and one record. Only with |
|
Retries up to 50 failed jobs, forgets one, or prunes them by age across every queue (Queue dashboard). |
|
Discards every job waiting on a queue, |
|
Per-minute job metrics over a window, where |
|
Hosted mode: the admin’s page. |
Envelopes#
A list:
{data, currentPage, perPage, total, lastPage}, or{data, nextCursor, hasMore, perPage}under a cursor, plussummarieswhen asked.An uncounted list: a resource that declares
withoutCount()issues no COUNT: its offset page is{data, currentPage, perPage, total: null, lastPage: null, hasMore}, wherehasMoresays whether another page follows (read from one row past the page), plussummarieswhen asked. A counted resource’s page carries nohasMore.GET /vector/openapi.jsondescribes each resource’s list in its own form. A collection’s page under/{id}/{relation}takes the target resource’s form; that path is not in the OpenAPI document. The cursor envelope is the same for every resource.A record:
{data, permissions}, wherepermissionsis{update, delete, restore, forceDelete, actions}.A write refusal: the framework’s RFC 9457 document with
errors[].path/code/message. Other refusals:{"error": "..."}.A repeater’s rows: a create or update sends the whole list, in its order. A JSON repeater’s row is an object of its row fields (
{"specs": [{"label": "Warranty", "value": "24 months"}]}); a relationship repeater’s row is an object of the child fields it writes plus theidof a child to keep ({"lines": [{"id": 7, "quantity": 3}, {"product": 4, "quantity": 1, "unitPriceCents": 1200}]}), where a child left out is deleted. A record carries a JSON repeater’s rows as its value and a relationship repeater as{count}. A refusal names the row:path: ["lines", 1, "quantity"], or["specs", 2]for a row that is not an object.Tags: a list of strings, stored trimmed and each at most once ignoring case; a refused tag is named by its index,
path: ["keywords", 2].An action:
{type, message, url, affected, jobId}, wheretypeismessage,redirect,url,danger(answered422) orjob(answered202); a download answers the file itself.A job:
{id, kind, resource, name, actorId, impersonatorId, status, total, processed, result, failure, hasFile, fileName, createdAt, updatedAt, finishedAt}.
The audit#
GET /vector/audit answers 403 unless the application’s
AuditPolicyInterface lets this user browse the audit (Audit trail and impersonation).
Every query parameter is optional:
Parameter |
Narrows to |
|---|---|
|
One or more resource slugs (or audit source names), comma-separated. One the user may not list, or that does not exist, finds nothing. |
|
One record’s id. Only with exactly one |
|
One or more events, comma-separated: |
|
The id of the user who made the change. |
|
|
|
The channel, such as |
|
A date ( |
|
The |
A malformed value is a 422 naming its parameter. The answer is
{data, nextCursor}, at most 50 entries newest first; nextCursor is
null once nothing is left, and a page can be short while it is not
(Paging). Each entry is:
{
"id": 4182,
"resource": "products",
"recordId": "14",
"event": "update",
"changes": {"status": {"from": "draft", "to": "active"}},
"actorId": "3",
"actorName": "Ada Admin",
"impersonatorId": null,
"impersonatorName": null,
"origin": null,
"createdAt": "2026-11-29T10:04:12.512Z",
"linked": true
}
changes holds every value on a create, {from, to} per field
otherwise, and only the fields this user may see, never a password.
linked is false once the record no longer exists, and for an entry of
no resource. A record’s own GET /vector/r/{resource}/{id}/audit
answers {data} with its entries in the same shape, without linked.
Language#
Labels in GET /vector/schema, /schema/{resource}, /settings,
/dashboards/{name} and widget results are translated for the request’s
language: the user’s locale preference (PUT /vector/preferences,
which refuses a language not on offer with 422), else the
administrator’s default, among the languages on offer;
Accept-Language is not consulted. The schema’s i18n is
{locale, locales: [{code, name, dir}]}, and its ETag covers the
language. Values and records are never translated. See Languages.
Relation options#
GET /vector/r/{resource}/fields/{field}/options answers
{data: [{id, label, subtitle?, image?}]}. subtitle (a string or
null) is present when the target declares searchSubtitle() and the
user may see that field; image likewise for searchImage(), and is
the image field to fetch from GET /vector/r/{target}/{id}/files/{image},
with the admin’s credentials, or null when the record has none. Both are
read in the options’ one statement. Relation values inside records stay
{id, label}.
Duplicate#
A resource’s replicable says whether the admin offers Duplicate; a
field’s unique whether a copy starts without its value (and, for an
import, whether it can match rows). A copy is an ordinary create. See
Duplicating.
Export#
GET /vector/r/{resource}/export takes the list grammar and format:
csv (the default) or xlsx when capabilities.exportFormats offers
it, else 422 on format. A CSV up to exportLimit() answers the
file; a larger one, and every XLSX, answers 202 {type: "job", jobId},
and the file is the job’s download (text/csv; charset=utf-8 or
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet).
An export writes exactly the columns named, in the list’s sort (by
key without one). A CSV writes each cell as an import reads it back: a
belongsTo as the related record’s key, a many-to-many as the keys it
holds, a|b|c. An XLSX shows a relation’s label. See Background jobs.
Import#
POST /vector/r/{resource}/import takes a multipart file, mapping
(JSON, CSV header → field name), mode and key:
|
Each row |
Needs |
|---|---|---|
|
is created |
|
|
updates the record whose |
|
|
updates the matching record, or is created when none matches |
either permission and a |
key is the resource’s primary key field or a field with
unique: true, and must be mapped. The mapping may name what the mode
writes: the create view’s fields, the update view’s, or either for
upsert (a row is then refused, per row, a field its own path does not
take). The key itself is matched by and never written by an update. An
empty cell is left out of the row’s body, so an update keeps that
field’s value, a many-to-many’s members included. Each
match is one indexed lookup through the resource’s scope(), excluding
trashed records, and each write goes through the writer, so rules, the
create or update policy, hooks and audit apply per row. The job’s
result is {created, updated, failed} (an object whose key order is
not guaranteed); refused rows, with an error column, are the job’s
file. POST …/import/preview suggests a mapping, including the key
column.
Layout#
A resource’s layout is null, or {form, show}: each a list of nodes
{kind, label, description, collapsible, collapsed, columns, span, name, children}, where kind is section, tabs, tab or field. A
field node names a field of the resource; the others hold children.
Every key is present on every node. The tree holds only the fields that
view shows and this identity may see, without a section or tab left
empty. Layout groups fields for display; it never changes a record, a
write or the list grammar. See Forms.
Values on the wire#
Value |
As |
|---|---|
Instants |
ISO 8601 strings, UTC |
Dates |
|
Money |
Integers in the currency’s minor units; the schema lists exceptions to hundredths in |
Belongs-to, has-one |
|
Has-many, many-to-many |
|
Rich text |
The editor’s JSON document in a string, or, where the field |
Markdown |
Its source |
Code |
The text as typed |
Date ranges |
|
Computed |
Typed by its |
Ids |
As the entity types them |
Trashed |
|
Version |
|
Other values are JSON scalars.
columns narrows the fields a list record carries to those index
fields, plus what their display needs (a money field’s currency). The
primary key is always there, since it is the record’s identity, whether
or not the columns name it.
The list grammar#
Parameter |
Meaning |
|---|---|
|
The page; |
|
Sortable fields; |
|
Filterable fields, with the operators they publish. |
|
Alternatives and combined groups, four deep, 50 conditions at most. |
|
The trash, on a soft-deleting resource. |
|
Search over the searchable fields: contains the term, a searchable relation’s title contains it, or full-text fields hold its words; see Resources. |
|
Group by a groupable field. |
|
Include the summaries. |
|
Only these fields, plus what their display needs. |
|
Keyset pages by the identifier. |
(archived or low stock) and (featured or expensive):
filter[and][0][or][0][status][eq]=archived&filter[and][0][or][1][stock][lte]=5
&filter[and][1][or][0][isFeatured][eq]=true&filter[and][1][or][1][priceCents][gt]=50000
A filter object’s conditions must all hold. filter[or][i] holds
alternatives, and any one of them may hold. filter[and][i] combines
filter objects. Each alternative or combined object is itself a filter
object. Groups nest at most four deep, a filter holds at most 50
conditions, and trashed belongs to the outermost object. The words
or, and and trashed cannot name a filterable field. Groups work
wherever a filter goes: lists and counts, summaries and grouping,
exports, an “all matching” selection, saved views, badges and the MCP
vector_query and vector_aggregate tools. The UI’s filter bar edits “any of” groups beside
the plain conditions; a saved view nested deeper than that shows as one
advanced condition that can be removed.
Anything outside the descriptor’s allow-lists answers 422 with the
reason.
Validating a filter without running it#
Code that builds a filter (an extension, a package turning a sentence
into conditions) checks it with the same grammar before anything runs:
Kinetis\Vector\Query\ListRequest::fromQueryParams($params, $descriptor, $converter), with the request’s
Kinetis\Vector\Write\ValueConverter, parses the parameters against the
resource’s descriptor as this user sees it and throws
InvalidListRequestException (the 422 above) on anything outside it.
It runs no query; only ResourceService::list() does. This is the
supported way to validate a filter.
Statement bounds#
A list, a show and a write run a fixed number of statements; see Limits and guarantees.
Errors#
Status |
When |
|---|---|
|
No identity. |
|
Not admitted, or refused by a policy: |
|
Unknown resource or record, or a queue-dashboard route that is not there for this user or this application (Queue dashboard). |
|
A stale version, a revert over a field changed since, or a clear on a queue backend that cannot discard jobs. |
|
Validation (the framework’s RFC 9457 document, with |
OpenAPI document#
GET /vector/openapi.json describes this API as an OpenAPI 3.1
document, for the user who asks. It has a path for each resource they
may list, with:
the list parameters that resource accepts: each field’s
filter[<field>][<op>]operators, the sortable fields,perPageup to the resource’s maximum,page,cursor,q,summaries,group,columns, andfilter[trashed]where it soft-deletes;show, create, update, delete and restore, with bodies built from the compiled fields and their rules;
its actions, export, import and relation options;
422as the RFC 9457 document and every other error as{"error": "…"}.
A resource, field or action the policies hide from this user is absent,
as it is from the descriptor. The document carries an ETag for the
document and the user, and If-None-Match answers 304.
It is served where the framework serves its own /openapi.json: when
OPENAPI_ENVIRONMENTS names APP_ENV. Unset, it is closed. A closed
endpoint answers every method with the 404 of a path no route matches,
before authentication runs; an open one is still in the vector group.
The setting is read when the worker boots. The framework’s own
/openapi.json lists Vector’s routes by their templates
(/vector/r/{resource} and so on); this document lists each resource’s
own.
See also#
Limits and guarantees: every bound.
MCP tools: the same services for agents.