1. DevCraft Platform
  2. Documentation
  3. REST API

Reference

REST API

Describes the development build as of 2026-10-11. The platform is under active development; statuses are marked on each page.

This is the reference for the DevCraft Platform REST API, version 1. It lists the conventions every endpoint shares (authentication, errors, headers, pagination) and then every route the backend registers, grouped by area, with the role it requires. It is written for developers who build integrations or extend the SPA; the route list is taken from backend/routes/api.php and the controllers.

Conventions

TopicRule
Base path/api/v1. Breaking changes go to a new /api/v2 group; additive changes stay in v1 and are optional for clients.
FormatJSON request and response bodies (Accept: application/json). Response keys are camelCase (pageSize, timeZone); timestamps are ISO 8601 with offset; identifiers are UUIDs (v7). XML transfer and package endpoints exchange application/xml.
ResourcesSingle objects are returned unwrapped: no data envelope. Paginated lists use { items, total, page, pageSize }.
ErrorsRFC 9457 application/problem+json with a stable machine-readable code. Branch on code, never on title or detail.
Rate limitsthrottle:api: 120 requests per minute per user (or IP) on the meta, table, portal and remote groups. throttle:login: 5 attempts per minute per e-mail and IP. Both are configurable (PLATFORM_RATE_LIMIT_API, PLATFORM_RATE_LIMIT_LOGIN). Exceeding a limit answers 429 rate_limited with Retry-After.
Route parametersTable, field and layout names must match [a-z][a-z0-9_]{0,79} (layouts also allow -). The dictionary decides whether a name exists; unknown and unreadable tables look the same (404 unknown_table).

Headers

X-Request-Id
On every response. Send your own (8 to 64 characters of [A-Za-z0-9._-]) to have it echoed and logged; otherwise the server generates one. Problem responses repeat it as requestId.
X-Correlation-Id
Same format. Identifies one client operation across several requests; when absent it equals the request id. Echoed on every response and stored on system log events. See Operations.
X-Change-Set
The id of the update set that configuration writes in this request are captured into. Without the header the user's saved current set is used, else the scope's Default set. A value that is not a UUID answers 400 invalid_query; a set that is no longer in progress makes the configuration write fail with 422 metadata_invalid (it is never redirected elsewhere). See Update sets.
X-XSRF-TOKEN
Required on state-changing requests of a cookie session (see below).

Authentication

The API uses Laravel Sanctum in two modes. Every endpoint except /api/v1/health and /api/v1/auth/login requires one of them.

ModeUsed byHow
Session cookieThe SPA, from an origin in SANCTUM_STATEFUL_DOMAINSGET /sanctum/csrf-cookie sets the XSRF-TOKEN cookie; send its value as X-XSRF-TOKEN on POST, PUT, PATCH and DELETE. Then POST /api/v1/auth/login starts the session. A missing or stale token answers 419 csrf_token_mismatch.
Bearer tokenIntegrations, scripts, remote instancesAuthorization: Bearer <token>. Create a token with POST /api/v1/auth/tokens while signed in.

Sign-in protections: 5 attempts per minute per e-mail and IP, and the account is locked after PLATFORM_LOCKOUT_ATTEMPTS (5) failures (423 account_locked; an administrator unlocks it). An unknown e-mail, a wrong password and an inactive account all give the same 422 message, so the API does not reveal which accounts exist.

Token abilities and expiry

AbilityChecked today
table:writeYes: Table API create, update and delete, XML import, portal request creation. Without it the answer is 403 forbidden.
remote:readYes: the /api/v1/remote/* provider routes.
table:read, meta:readStored on the token for the planned API scopes; not yet checked separately. Reads are governed by table and field access.

A token gets all four abilities unless you pass a subset. It expires after expires_in_days (1 to 365, default 90). The plain token is returned once; only a hash is stored. POST /api/v1/auth/logout with a bearer token revokes that token. A session has every ability. Roles are the user's effective roles (direct grants plus group roles); admin is never derived from groups. See Access control.

Errors

App\Platform\Kernel\Http\ProblemDetails renders every exception under /api/* as a problem document with Content-Type: application/problem+json:

HTTP/1.1 422 Unprocessable Content
Content-Type: application/problem+json
X-Request-Id: 0192f3c4-8a1b-7c2d-9e0f-1a2b3c4d5e6f

{
  "type": "about:blank",
  "title": "Validation failed.",
  "status": 422,
  "detail": "Urgency must be one of: 1, 2, 3.",
  "instance": "/api/v1/table/incident/0192f1a2-7d3e-7000-8000-000000000101",
  "code": "validation_failed",
  "requestId": "0192f3c4-8a1b-7c2d-9e0f-1a2b3c4d5e6f",
  "errors": {
    "urgency": ["Urgency must be one of: 1, 2, 3."]
  }
}

Members: type, title, status, detail, instance (request path), code, requestId, plus code-specific members such as errors, currentVersion, referrers, outcome and details. Empty members are omitted. A 500 hides the exception message unless APP_DEBUG is on; quote the request id instead.

Stable error codes

CodeStatusMeaning and extra members
bad_request400Generic malformed request.
invalid_query400Invalid list parameters (page, sort, filters, operator for a field type, unknown field), malformed X-Change-Set.
xml_invalid400Malformed or refused record XML (for example a DOCTYPE or entity), or a value XML cannot carry on export.
package_invalid400Malformed update set package.
unauthenticated401No valid session or token; expired or revoked token.
forbidden403Missing role, table access or token ability; writes to platform-managed tables.
not_found404Record, layout or object does not exist (or is not visible to the caller).
unknown_table404Table does not exist, is retired, or the caller may not read it.
method_not_allowed405HTTP method not supported on the path.
conflict409Optimistic lock failed; currentVersion holds the record's current version.
reference_in_use409Delete refused by a restricting reference; referrers lists { table, field, count }.
preview_expired410Package preview is past its lifetime.
transfer_too_large413XML export or import above the configured limits.
package_too_large413Package above the size or change limits.
csrf_token_mismatch419Cookie session without a valid X-XSRF-TOKEN.
validation_failed422Field validation; errors maps field names to messages.
metadata_invalid422Invalid or conflicting metadata, invalid update set operation, stale current update set; errors per attribute.
xml_unsupported_version422Record document of an unsupported format or major version.
package_unsupported_version422Package of an unsupported format version.
package_not_exportable422Update set cannot be exported (for example not completed), with the reason.
account_locked423Too many failed sign-ins.
rate_limited429Rate limit exceeded; see Retry-After.
internal_error500Unhandled exception; logged with the request id.
http_errorotherAny other HTTP status raised by the framework.

Remote instance and remote update set codes are remote_<outcome>, with outcome and sanitised details members. They never contain credentials or authorization headers.

CodeStatusMeaning
remote_no_credential, remote_inactive, remote_blocked_url, remote_unreachable, remote_timeout, remote_auth_failed, remote_forbidden, remote_not_found, remote_remote_error, remote_invalid_response, remote_incompatible, remote_identity_mismatch, remote_too_large422Classified outcome of a connection to another instance (remote_not_found is 404 when a change does not exist in a set).
remote_busy409The remote update set is being processed by another run.
remote_stale_decision409The change was decided or re-assessed since the page loaded; details.currentVersion.
remote_stale_comparison409The comparison is out of date with the package or the local object; compare again.
remote_stale_approval409The approval token no longer matches the plan; review it again.
remote_invalid_transition422Lifecycle transition not allowed in the current state.
remote_integrity, remote_package_missing, remote_package_unreadable422Stored package fails its checksum, was removed by retention, or cannot be read; retrieve it again.
remote_resolution_not_allowed, remote_merge_invalid422Conflict decision not available for the change; merged object not valid here.
remote_not_eligible422The set is not eligible for application; details.reasons.
remote_target_missing, remote_unsupported_operation, remote_content_changed, remote_verification_failed422An application run stopped on one change and was rolled back.

Per-record outcomes of an XML import are not errors: the import answers 200 and lists each record's outcome and reason. See Operations.

Lists, filters and pagination

The Table API list endpoint (GET /api/v1/table/{table}) takes these query parameters:

ParameterFormatLimits
pageinteger, from 11 to 100,000
pageSizeinteger1 to 500; default is the list layout's page size (25)
sortfield:asc|desc, comma-separated; -field means descendingat most 4 fields
filtersJSON array of { "field", "operator", "value" }at most 32 conditions
matchand (default) or orhow the filters combine
searchtext over the table's searchable fields200 characters
listname of a list layoutdefault default; its default filter applies

Operators: eq, neq, contains, startsWith, in (1 to 100 values), isEmpty, isNotEmpty, lt, lte, gt, gte. Each field type supports a subset; a wrong combination answers 400 invalid_query. Filters, sorts and search run on the caller's field projection, so a field you cannot read cannot be filtered or sorted on.

The SPA's encoded query in the URL (?q=state=1^short_descriptionCONTAINSprinter) is a client-side notation. The SPA decodes it against the dictionary and sends filters and match; the API never receives the q string.

Response:

{
  "items": [
    {
      "id": "0192f1a2-7d3e-7000-8000-000000000101",
      "table": "incident",
      "class": "incident",
      "version": 3,
      "display": "INC0010001",
      "createdAt": "2026-10-11T08:12:04+00:00",
      "updatedAt": "2026-10-11T08:40:51+00:00",
      "createdBy": { "id": "0192…", "display": "example.agent", "table": "sys_user" },
      "updatedBy": { "id": "0192…", "display": "example.agent", "table": "sys_user" },
      "values": {
        "number": "INC0010001",
        "short_description": "Printer on floor 2 does not print",
        "state": "2",
        "urgency": "2",
        "caller_id": { "id": "0192…", "display": "example.caller", "table": "sys_user" }
      }
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 25
}

table is the table the record was read through, class its actual class: a query on task returns incidents, problems and change requests. Reference values are expanded to { id, display, table }. Pagination is page/offset based and counts the total. Other paginated endpoints (update sets, package changes, remote update sets) use the same envelope with their own page, pageSize, search and sort parameters.

Endpoints: authentication, users and roles

MethodPathPurposeRequires
POST/api/v1/auth/loginBody { email, password, remember? }. Starts a cookie session and returns the Session payload.none (throttled)
GET/api/v1/auth/sessionCurrent Session: user { id, name, initials, email, roles, locale, timeZone }, environment, workspace, issuedAt, platform { dateFormat, dateTimeFormat, timeZone }.authenticated
POST/api/v1/auth/logoutEnds the session; revokes the bearer token when one was used. 204.authenticated
POST/api/v1/auth/tokensBody { name, abilities?, expires_in_days? }. 201 with { id, name, abilities, expiresAt, token }; the token is shown once.authenticated
GET/api/v1/admin/rolesList of platform roles.role admin

There is no dedicated user management endpoint. Users, groups and memberships are records of sys_user, sys_user_group and related tables and are read and written through the Table API under each table's access rules.

Endpoints: metadata

Read endpoints only show tables the caller may read, projected to the fields the caller may see. Admin write endpoints go through MetadataWriter, which validates everything and invalidates the metadata cache. Payloads are described in Metadata engine.

MethodPathPurposeRequires
GET/api/v1/meta/tablesReadable, non-retired tables.authenticated
GET/api/v1/meta/tables/{table}One table's effective definition, detailed.table read access
GET/api/v1/meta/tables/{table}/fieldsThe table's visible fields, including column defaults for lists.table read access
GET/api/v1/meta/tables/{table}/formsForm layouts of the table (nearest ancestor's when it has none).table read access
GET/api/v1/meta/tables/{table}/forms/{form}One rendered form definition.table read access
GET/api/v1/meta/tables/{table}/listsList layouts of the table.table read access
GET/api/v1/meta/tables/{table}/lists/{list}One rendered list definition.table read access
POST/api/v1/admin/meta/tablesCreate a table.role admin
PATCH/api/v1/admin/meta/tables/{table}Change a table.role admin
POST/api/v1/admin/meta/tables/{table}/fieldsAdd a field.role admin
PATCH/api/v1/admin/meta/tables/{table}/fields/{field}Change a field declared on this table.role admin
PUT/api/v1/admin/meta/tables/{table}/overrides/{field}Override an inherited field for this child table (label, mandatory, read-only, default, choices).role admin
PUT/api/v1/admin/meta/tables/{table}/forms/{form}Save a form layout.role admin
PUT/api/v1/admin/meta/tables/{table}/lists/{list}Save a list layout.role admin
GET/api/v1/admin/config/versions?objectTable=…&objectId=…Version history of one configuration object (both parameters required).role admin
POST/api/v1/admin/config/versions/{version}/restoreRestore an object to a recorded version.role admin

Endpoints: Table API, XML transfer and system logs

One generic API for the records of every table. Reads go through RecordQuery, writes through RecordWriter; there is no other path. Access is per table (read, write and delete role lists, deny by default; admin bypasses role lists) and per field. Tables with managed_by are read-only for everyone.

MethodPathPurposeRequires
GET/api/v1/table/{table}Paginated list with filters, sort and search (above). Includes records of child classes.table read access
POST/api/v1/table/{table}Body { "values": { … } }. Creates a record; 201 with the record.table write access + table:write
GET/api/v1/table/{table}/{id}One record.table read access
PATCH/api/v1/table/{table}/{id}Body { "values": { … }, "expectedVersion"?: n }. Changes the given fields; with expectedVersion a concurrent change answers 409 conflict.table write access + table:write
DELETE/api/v1/table/{table}/{id}Deletes a record; 204. 409 reference_in_use when restricted.table delete access + table:write
GET/api/v1/table/{table}/{id}/exportOne record as devcraft-record-xml (attachment).table read access
POST/api/v1/table/{table}/exportBody { ids } or { filters?, match?, search? }. Streamed XML document, at most 5,000 records.table read access
POST/api/v1/table/{table}/import?mode=insert|update|upsert&dryRun=1|0&atomic=1|0XML body or multipart file. Plans (default dryRun=1) or applies the document; per-record outcomes.table write access on every class touched + table:write

Writes return the record projected to the fields the caller may see. Values are sent as the field types accept them: choice values (not labels), reference ids, ISO dates. Read-only fields and system fields are refused per field in errors; numbering fields such as number are assigned by the platform. Writes to records of configuration tables are captured into the current update set (see X-Change-Set).

System logs have no separate endpoint. Read them as records of the syslog table: GET /api/v1/table/syslog and GET /api/v1/table/syslog/{id}, role admin only. Writes answer 403 because the platform manages the rows. See Operations. Update set items and configuration versions are also read through the Table API (sys_change_set_item, sys_config_version), and remote instance records are written through it (sys_remote_instance).

Endpoints: update sets and packages

All routes below sit in the /api/v1/admin group and require the role admin. Background: Update sets and Promotion.

Local update sets

MethodPathPurpose
GET/admin/config/change-sets/currentThe caller's current set, the scope's Default set, and whether the selection is stale.
PUT/admin/config/change-sets/currentBody { id: uuid|null }. Selects the current set (must be in progress).
GET/admin/config/change-setsPaginated list; page, pageSize, sort (name, state, sys_updated_at, completed_at), state, owner, search, kind.
POST/admin/config/change-setsBody { name, description? }. Creates a set.
GET/admin/config/change-sets/{id}One set.
PATCH/admin/config/change-sets/{id}Body { name?, description? }.
POST/admin/config/change-sets/{id}/completeCompletes a set (not the Default set).
POST/admin/config/change-sets/{id}/reopenReopens a completed set on the environment it was created on.
POST/admin/config/change-sets/{id}/items/moveBody { target, items: [ids] }. Moves captured changes to another set of the same scope.

Update set packages

MethodPathPurpose
GET/admin/config/change-sets/{id}/exportA completed set as a devcraft-update-set-xml package (attachment, X-Package-Id). 422 package_not_exportable otherwise.
GET/admin/config/packages/previewsThe caller's previews that have not expired.
POST/admin/config/packages/previewsUpload a package (XML body or multipart file) and validate it without applying anything.
GET/admin/config/packages/previews/{id}One preview with its validation outcome.
POST/admin/config/packages/previews/{id}/validateRe-run the validation against this instance now.
GET/admin/config/packages/previews/{id}/changesPaginated changes; status, operation, kind, search, sort.
GET/admin/config/packages/previews/{id}/changes/{seq}One change with payload and comparison.
GET/admin/config/packages/previews/{id}/reportThe validation report as a downloadable JSON file.
DELETE/admin/config/packages/previews/{id}Discard a preview.

Previews belong to the user who uploaded them, expire after 24 hours (410 preview_expired) and are limited to 20 per user. An uploaded package is never applied directly; application goes through remote update sets.

Endpoints: remote instances and remote update sets

Provider side (what another instance reads)

These routes serve the DevCraft remote protocol to another instance. They require a bearer token with the remote:read ability, held by a service account with the role admin, and are rate-limited by throttle:api.

MethodPathPurpose
GET/api/v1/remote/identityIdentity and capabilities of this instance.
GET/api/v1/remote/update-setsCompleted update sets only; page, pageSize, search, sort (completed_at, name).
GET/api/v1/remote/update-sets/{id}/packageOne completed set as a package document.

Remote instances (consumer side)

Role admin. The instance records themselves are Table API writes on sys_remote_instance.

MethodPathPurpose
POST/api/v1/admin/config/remote-instances/validate-urlBody { url }. The outbound URL policy's verdict, without contacting anything.
GET/api/v1/admin/config/remote-instances/{id}/statusStored connection state.
PUT/api/v1/admin/config/remote-instances/{id}/credentialBody { token }. Stores the service account token encrypted; it is never returned.
DELETE/api/v1/admin/config/remote-instances/{id}/credentialRemoves the stored credential.
POST/api/v1/admin/config/remote-instances/{id}/testServer-side connection test.
GET/api/v1/admin/config/remote-instances/{id}/update-setsDiscovery of the remote's completed update sets (pageSize up to 100).
POST/api/v1/admin/config/remote-instances/{id}/retrieveBody { ids: [uuid], replace?: bool }. Retrieves sets as validated packages.

Remote update sets

Role admin. Prefix /api/v1/admin/config/remote-update-sets/{id}. One run at a time per set (409 remote_busy).

MethodPath suffixPurpose
GET(none)The retrieved set.
POST/validateValidate the stored package.
POST/compareCompare every change with this instance.
POST/refreshBody { replace? }. Retrieve the same set again.
POST/reviewBody { note? }. Mark as reviewed.
POST/rejectBody { reason? }. Reject; package content is pruned after the retention period.
GET/changesPaginated assessment; filters classification, conflict, validation, operation, kind, category, severity, plan, resolution, search, sort.
GET/changes/{seq}One change with the incoming and the local payload.
POST/changes/{seq}/resolveBody { resolution, version, note? }. Decide a conflict: keep_local, accept_remote, merge, skip or unresolved.
GET/changes/{seq}/mergeField-level merge proposal; nothing stored.
POST/assessRecompute readiness and dependency blockers.
GET/planThe application plan.
GET/decisionsAppend-only decision history.
GET/historyAudit trail of lifecycle and retrievals.
GET/applyEligibility verdict, ordered plan and approval token.
POST/applyBody { approval, note? }. Applies the set in one transaction with verification and rollback.
GET/applicationsApplication runs, newest first.
GET/applications/{runId}One run with per-operation results.
POST/previewCreate a package preview of the stored document for the caller.
GET/packageThe stored package document.

Endpoints: background scripts, portal and health

MethodPathPurposeRequires
GET/api/v1/admin/scripts/runtimeRunner configuration and reachability, scopes, source limit.role admin
POST/api/v1/admin/scripts/runBody { source, scope?, allowWrites? } (scope global). Runs a script in the isolated runner; returns the recorded execution. Status unavailable when no runner answers; nothing is executed.role admin, a person (not a machine account)
GET/api/v1/admin/scripts/executions?limit=Recent executions without their source (limit 1 to 100, default 20).role admin
GET/api/v1/portal/items?kind=all|requests|tasks&pageSize=The caller's own requests and assigned tasks, scoped on the server.authenticated person
GET/api/v1/portal/items/{table}/{id}One of the caller's items with the portal field projection; anything else is 404.authenticated person
POST/api/v1/portal/requestsBody { shortDescription, description?, urgency? }. Raises an incident for the caller through RecordWriter.authenticated person + table:write
GET/api/v1/healthLiveness plus database check; 503 when degraded.none
GET/upFramework liveness probe (outside /api/v1).none

The Service Portal's catalogue and knowledge articles are illustrative client data and have no API yet. Machine accounts have no portal (403). Script execution details: Scripting and flows.

Examples

The examples assume the local stack on http://localhost:8000 and an origin listed in SANCTUM_STATEFUL_DOMAINS. Credentials come from your environment; never put them in scripts you commit.

Sign in and create a token

  1. Get the CSRF cookie. The Origin header makes Sanctum treat the request as the SPA.
    API=http://localhost:8000
    ORIGIN=http://localhost:5173
    curl -s -c jar.txt -b jar.txt -H "Origin: $ORIGIN" -H "Accept: application/json" "$API/sanctum/csrf-cookie"
    XSRF=$(awk '$6 == "XSRF-TOKEN" {print $7}' jar.txt | python3 -c "import sys, urllib.parse; print(urllib.parse.unquote(sys.stdin.read().strip()))")
  2. Sign in. The password is read from PLATFORM_ADMIN_PASSWORD in your shell.
    curl -s -c jar.txt -b jar.txt -H "Origin: $ORIGIN" -H "X-XSRF-TOKEN: $XSRF" \
      -H "Accept: application/json" -H "Content-Type: application/json" \
      -d "{\"email\": \"$PLATFORM_ADMIN_EMAIL\", \"password\": \"$PLATFORM_ADMIN_PASSWORD\"}" \
      "$API/api/v1/auth/login"
    The answer is the Session payload. A wrong e-mail or password answers 422 validation_failed with errors.email.
  3. Create a token for an integration that only reads.
    curl -s -c jar.txt -b jar.txt -H "Origin: $ORIGIN" -H "X-XSRF-TOKEN: $XSRF" \
      -H "Accept: application/json" -H "Content-Type: application/json" \
      -d '{"name": "reporting-integration", "abilities": ["table:read", "meta:read"], "expires_in_days": 30}' \
      "$API/api/v1/auth/tokens"
    {
      "id": 7,
      "name": "reporting-integration",
      "abilities": ["table:read", "meta:read"],
      "expiresAt": "2026-11-10T09:00:00+00:00",
      "token": "<shown once>"
    }
    Store the token in a secret store and use it as Authorization: Bearer $TOKEN. Because it lacks table:write, every write with it answers 403.

List records with a filter

Open and in-progress incidents whose short description contains "printer", newest first. The SPA would show this as /incident/list?q=stateIN1,2^short_descriptionCONTAINSprinter; the API receives the structured filters:

curl -s -G -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" \
  --data-urlencode 'filters=[{"field":"state","operator":"in","value":["1","2"]},{"field":"short_description","operator":"contains","value":"printer"}]' \
  --data-urlencode 'match=and' \
  --data-urlencode 'sort=sys_created_at:desc' \
  -d page=1 -d pageSize=25 \
  "$API/api/v1/table/incident"

The answer is the { items, total, page, pageSize } envelope shown in Lists, filters and pagination. An unknown field or an operator the field type does not support answers 400 invalid_query.

Create a record

curl -s -H "Authorization: Bearer $WRITE_TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" \
  -d '{"values": {"short_description": "Printer on floor 2 does not print", "caller_id": "0192f1a2-7d3e-7000-8000-0000000000aa", "urgency": "2"}}' \
  "$API/api/v1/table/incident"
HTTP/1.1 201 Created
Content-Type: application/json
X-Request-Id: 0192f3c4-…
{
  "id": "0192f1a2-7d3e-7000-8000-000000000101",
  "table": "incident",
  "class": "incident",
  "version": 1,
  "display": "INC0010001",
  "values": {
    "number": "INC0010001",
    "short_description": "Printer on floor 2 does not print",
    "caller_id": { "id": "0192f1a2-7d3e-7000-8000-0000000000aa", "display": "example.caller", "table": "sys_user" },
    "urgency": "2",
    "state": "1"
  }
}

The response is shortened. The number comes from the table's numbering, defaults (here state) are applied, and the write is audited. caller_id and short_description are mandatory on incidents.

Update with a validation error

curl -s -i -X PATCH -H "Authorization: Bearer $WRITE_TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" \
  -d '{"values": {"urgency": "9"}, "expectedVersion": 1}' \
  "$API/api/v1/table/incident/0192f1a2-7d3e-7000-8000-000000000101"
HTTP/1.1 422 Unprocessable Content
Content-Type: application/problem+json
X-Request-Id: 0192f3c4-…
{
  "type": "about:blank",
  "title": "Validation failed.",
  "status": 422,
  "detail": "Urgency must be one of: 1, 2, 3.",
  "instance": "/api/v1/table/incident/0192f1a2-7d3e-7000-8000-000000000101",
  "code": "validation_failed",
  "requestId": "0192f3c4-…",
  "errors": { "urgency": ["Urgency must be one of: 1, 2, 3."] }
}

Nothing was written. If someone else had changed the record since version 1, the same request would answer 409 conflict with currentVersion; reload and try again.

Planned API work

Planned The REST API milestone (ROADMAP M6) extends the current API so integrations get the same capabilities and security as the UI. None of the following exists yet:

ItemStatusScope
OpenAPI 3.1 documentPlannedGenerated from the controllers and the field type registry, published at /api/docs for authenticated users; contract tests validate every response against it.
AggregatesPlannedPOST /api/v1/aggregate/{table}: count, group by, min, max, avg, sum through the same query compiler and access rules.
Idempotency keysPlannedReplaying a POST with the same Idempotency-Key returns the original response and creates no second record.
Keyset paginationPlannedStable paging under concurrent inserts, as an alternative to page numbers.
Query and representation optionsPlannedA fields parameter, display=value|both, a POST search endpoint for long filters, If-Match/ETag based on the record version.
Token managementPlannedEnforced read scopes, last-used tracking, revocation and a token management page, per-token rate limits.