Administrator request models¶
Administrator routes are a separate cross-owner surface under /v1/admin/.
Viewer membership permits inspection; mutations require operator membership.
Browser cookie mutations also require same-origin Origin and X-Linha-CSRF.
Application OAuth identity alone does not grant administrator membership.
See console procedures and public routes.
For POST /v1/admin/jobs/batch, malformed input changes no jobs. A valid batch
returns HTTP 200 with independent per-item outcomes; failed items do not roll
back successful items. Moves retain IDs, requests, original result policy,
attempt counts and retry backoff. The destination must be active and match owner,
logical name, engine type/version and source workload-storage access.
{"action":"move","targetContextId":"corrected-context-id","jobs":[{"id":"request-id","contextId":"old-context-id"}]}
Field paths below are relative to their containing model; output fields have no caller default.
AdminSession¶
Output of GET /v1/admin/session; current browser/admin identity and mutation token.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
actor |
string | Present; no caller default | Authenticated administrator identity recorded for this action/session. |
role |
string | Present; no caller default | Administrator role: viewer or operator. Values: viewer, operator. |
csrf |
string | Optional output; no caller default | Session-bound CSRF value required for browser cookie mutations. |
expiresAt |
string (date-time) | Optional output; no caller default | Server-recorded expiry instant (RFC 3339); check before using retained access. |
AdminJob¶
Administrator job output with owner, context and replay metadata.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
id |
string | Present; no caller default | Opaque server/resource identity; preserve it verbatim. |
contextId |
string | Present; no caller default | Opaque immutable context-version ID, not the logical context name. |
request |
SubmitRequest | Present; no caller default | Original accepted SubmitRequest; payload and retry policy remain durable. |
state |
string | Present; no caller default | Current persisted or observed lifecycle state; see the model notes. Values: QUEUED, RUNNING, RETRYING, CANCELLING, CANCELLED, FAILED, SUCCEEDED. |
submittedAt |
string (date-time) | Present; no caller default | Original server acceptance instant, retained across retry and queue movement (RFC 3339). |
updatedAt |
string (date-time) | Present; no caller default | Last durable job state/update instant (RFC 3339). |
attemptCount |
integer | Present; no caller default | Number of persisted execution attempts, including lost attempts. |
progress |
Progress | Optional output; no caller default | Optional current-attempt progress. Cleared when a new attempt is claimed. |
failure |
Failure | Optional output; no caller default | Persisted execution diagnostics, when present. |
result |
Result | Optional output; no caller default | Published result or registered result descriptor as specified by the containing model. |
owner |
string | Optional output; no caller default | Authenticated application owner; supplied by the server, not application request JSON. |
contextName |
string | Optional output; no caller default | Stable logical context name. |
contextVersion |
string | Optional output; no caller default | Hash identifying the effective normalized backend configuration. |
metricContext |
string | Optional output; no caller default | Bounded metric alias for this owner/logical context. |
submittedBy |
string | Optional output; no caller default | Administrator actor that accepted/replayed this request, if any. |
replayedFrom |
string | Optional output; no caller default | Optional source public job ID recorded for an administrator replay. |
AdminSubmitRequest¶
Operator input for a new or replayed request in an administrator-selected context.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
handler |
string | Required; no default | Stable registered handler name; executable code is installed in the worker image. Minimum length: 1. Maximum length: 256. |
version |
integer | Required; no default | Version of the associated protocol, handler or configuration. Minimum: 1. |
payload |
JSON value | Required; no default | Any valid JSON value understood by this handler; no remotely executable classes or closures. |
idempotencyKey |
string | Required; no default | Business acceptance key, 1–256 bytes, scoped to owner and logical context name. Minimum length: 1. Maximum length: 256. |
retry |
RetryPolicy | Optional; omitted | Bounded retry policy; omission disables retries beyond the initial attempt. |
deadline |
string (date-time) | Optional; omitted | Optional absolute RFC 3339 execution deadline. Recovery also fails queued/retrying work after it passes. |
replayedFrom |
string | Optional; omitted | Optional source public job ID recorded for an administrator replay. |
activateIfStopped |
boolean | Optional; omitted | Explicit operator consent to activate a stopped context for new work; default false. |
AdminResult¶
Administrator retained-result metadata; file details may include authorized physical locations.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
descriptor |
ResultDescriptor | Present; no caller default | Registered result identity; kind/schema/version must match the claimed capability. |
expiresAt |
string (date-time) | Present; no caller default | Server-recorded expiry instant (RFC 3339); check before using retained access. |
expired |
boolean | Present; no caller default | Whether payload retention has ended; job IDs and status remain. |
files |
array of object (fields) | Present; no caller default | Verified output descriptors. JSON requires exactly one file; status requires none. |
dataset |
object (fields) | Optional output; no caller default | Optional sealed distributed dataset metadata, valid only for dataset results. |
files[]¶
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
files[].file |
ResultFile | Present; no caller default | Retained ResultFile metadata for this administrator-visible artifact. |
files[].location |
string | Present; no caller default | Published physical path or S3 URI when safely available; staging locations are not exposed. |
files[].unavailable |
string | Optional output; no caller default | Safe reason the published physical location cannot currently be resolved. |
dataset¶
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
dataset.metadata |
DatasetManifest | Optional output; no caller default | Only application labels and annotations; reserved runtime keys are protected. |
dataset.location |
string | Optional output; no caller default | Published physical path or S3 URI when safely available; staging locations are not exposed. |
dataset.available |
boolean | Optional output; no caller default | Whether current engine observation is available. |
AdminPreview¶
Bounded JSON/text preview returned to an administrator; text must be displayed escaped.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
text |
string | Present; no caller default | Bounded UTF-8 result preview; display as escaped text. |
truncated |
boolean | Present; no caller default | True when the preview reached its size bound. |
validJSON |
boolean | Present; no caller default | Whether the bounded preview parses as JSON. |
maxBytes |
integer | Present; no caller default | Maximum bytes used to produce this bounded preview. |
AdminAudit¶
Output audit receipt for an administrator action, including queue moves.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
id |
string | Present; no caller default | Opaque server/resource identity; preserve it verbatim. |
actor |
string | Present; no caller default | Authenticated administrator identity recorded for this action/session. |
action |
string | Present; no caller default | Requested administrator action or audit action name. |
owner |
string | Optional output; no caller default | Authenticated application owner; supplied by the server, not application request JSON. |
contextId |
string | Optional output; no caller default | Opaque immutable context-version ID, not the logical context name. |
jobId |
string | Present; no caller default | Public persisted job ID. |
replayedFrom |
string | Optional output; no caller default | Optional source public job ID recorded for an administrator replay. |
outcome |
string | Present; no caller default | Per-action/per-item outcome; inspect the structured error for failures. |
acceptedAt |
string (date-time) | Present; no caller default | Server-recorded administrator action acceptance time (RFC 3339). |
sourceContextId |
string | Optional output; no caller default | Source context for a move. contextId identifies the destination. |
AdminJobPage¶
Paginated administrator output; items follow the named observation/receipt model.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
items |
array of AdminJob | Present; no caller default | Items in this page/receipt; follow the linked item type. |
nextCursor |
string | Optional output; no caller default | Opaque continuation token. Omission/empty value means no further page. |
AdminAuditPage¶
Paginated administrator output; items follow the named observation/receipt model.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
items |
array of AdminAudit | Present; no caller default | Items in this page/receipt; follow the linked item type. |
nextCursor |
string | Optional output; no caller default | Opaque continuation token. Omission/empty value means no further page. |
AdminJobSelection¶
Input selection containing a public job ID and its expected source context version.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
id |
string | Required; no default | Opaque server/resource identity; preserve it verbatim. Minimum length: 1. Maximum length: 256. |
contextId |
string | Required; no default | Opaque immutable context-version ID, not the logical context name. Minimum length: 1. Maximum length: 256. |
AdminBatchRequest¶
Operator input for batch cancel or move.
Move requires targetContextId; cancel forbids it. IDs must be unique. Each contextId is the expected source context.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
action |
string | Required; no default | Requested administrator action or audit action name. Values: cancel, move. |
jobs |
array of AdminJobSelection | Required; no default | Selected public IDs with expected source context versions; 1–200 unique IDs. Minimum items: 1. Maximum items: 200. |
targetContextId |
string | Optional; omitted | Required destination for move; forbidden for cancel. Minimum length: 1. Maximum length: 256. |
AdminBatchItem¶
One output outcome in a valid batch; inspect error or job for the individual item.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
id |
string | Present; no caller default | Opaque server/resource identity; preserve it verbatim. |
outcome |
string | Present; no caller default | Per-action/per-item outcome; inspect the structured error for failures. Values: moved, cancelled, cancelling, unchanged, failed. |
job |
AdminBatchJob | Optional output; no caller default | Job assignment or compact action result; follow its linked model. |
error |
object (fields) | Optional output; no caller default | Optional safe per-item code/message; no partial payload copy. |
error¶
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
error.code |
string | Present; no caller default | Machine-readable error or failure code; do not branch on message text. |
error.message |
string | Present; no caller default | Human-readable detail; progress messages are at most 4096 bytes. |
AdminBatchResult¶
Output receipt for a valid batch action.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
items |
array of AdminBatchItem | Present; no caller default | Items in this page/receipt; follow the linked item type. Maximum items: 200. |
AdminBatchJob¶
Compact output job state after a batch action, without the payload.
| Field | Type | Presence / default | Meaning and constraints |
|---|---|---|---|
id |
string | Present; no caller default | Opaque server/resource identity; preserve it verbatim. |
contextId |
string | Present; no caller default | Opaque immutable context-version ID, not the logical context name. |
state |
string | Present; no caller default | Current persisted or observed lifecycle state; see the model notes. |
attemptCount |
integer | Present; no caller default | Number of persisted execution attempts, including lost attempts. Minimum: 0. |
updatedAt |
string (date-time) | Present; no caller default | Last durable job state/update instant (RFC 3339). |