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 |
|
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 repeater’s current rows. |
|
|
|
Choices for a relation input, each |
|
Stores one file (multipart |
|
The record’s stored file. |
|
The record’s history. |
|
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. |
|
Hosted mode: the admin’s page. |
Envelopes¶
A list —
{data, currentPage, perPage, total, lastPage}, or{data, nextCursor, hasMore, perPage}under a cursor, plussummarieswhen asked.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": "..."}.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}.
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
Fields.
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. 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. 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 |
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. |
|
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 tool. 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.
Statement bounds¶
A list page is at most: one count, one page, one statement per relation field on the page, one aggregate for summaries. A show is one statement plus one per relation field. A write is one flush.
Errors¶
Status |
When |
|---|---|
|
No identity. |
|
Not admitted, or refused by a policy: |
|
Unknown resource or record. |
|
A stale version, or a revert over a field changed since. |
|
Validation — the framework’s RFC 9457 document, with |
See also¶
Limits and guarantees — every bound.
MCP tools — the same services for agents.