openapi: 3.1.0 jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema info: title: ANAS Web API version: 0.8.0-m5 description: | M2 API for the ANAS administration daemon. This contract is versioned independently from the CLI JSON contract: HTTP responses use `anas.dev/api/v1`, while the CLI continues to use `anas.dev/cli/v1`. Workspaces are registered when `anasd` starts. Callers address them only by opaque workspace ID; request and response DTOs never contain host filesystem paths. M1A adds bootstrap exchange and local-owner authentication while the workspace surface remains read-only. Route visibility and transport are state-dependent. M1B adds durable job history and event replay, the certificate-bound bootstrap-to-enrollment handoff and initial local-owner creation, synchronous managed-configuration read/validation/atomic save, audited typed deployment planning, bootstrap first-apply jobs, and local owner step-up for full-state direct apply. M1C adds a separately built Vue console shell plus an independent recovery bundle, both served from immutable assets embedded in `anasd`. M1.5 adds a separate mTLS trusted-proxy listener whose verified OIDC directory identity receives the same management capabilities while local-account routes remain direct-listener only. M2 adds live container health, dependency-expanded Module lifecycle previews and durable start/stop/restart/rollback jobs. M3 adds typed Module catalog, configuration and update operations. M4 adds the non-privileged snapshot, backup planning/listing and local-administrator surface plus server-generated terminal-only action descriptors. M5 closes the required API surface and applies opaque cursor pagination to every list. Saving desired configuration does not apply it. A disallowed state, listener, or transport is deliberately indistinguishable from an unknown path and returns 404. servers: - url: http://{host}:8080 description: Bootstrap plaintext listener on the fixed default management port. variables: host: default: 127.0.0.1 description: A numeric local address accepted by the configured Host policy. - url: https://{host}:8080 description: TLS listener on the same fixed management port after a certificate is available. variables: host: default: anas.example description: A DNS name or numeric local address accepted by the configured Host policy. security: [] tags: - name: Service - name: Console - name: Authentication - name: Jobs - name: Workspace - name: Configuration - name: Deployments - name: Modules - name: Maintenance paths: /api/v1/service/workspaces/{ws}/applications/{application}/credentials: parameters: - $ref: "#/components/parameters/WorkspaceID" - name: application in: path required: true schema: {type: string, minLength: 1, maxLength: 128} post: operationId: readServiceApplicationCredential summary: Read a registered backend credential using a bounded service grant description: | Available only on the direct TLS listener in full state when service_api is configured. The caller authenticates using its daemon-issued service token. anasd checks the exact API permission, workspace and application grant; user authorization and recent password verification belong to the calling server. actor is only service-declared audit context, never a user authentication claim. Secrets are returned only after durable audit succeeds. No workspace path or arbitrary secret name is accepted. tags: [Service] security: - serviceBearer: [] x-anas-permission: application.credentials.read x-anas-scope: workspace x-anas-listeners: [direct] x-anas-state-access: full: {authentication: service, transports: [tls]} requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [actor] properties: actor: {type: string, minLength: 1, maxLength: 256} request_id: {type: string, minLength: 1, maxLength: 128} responses: "200": description: Current credential, returned only after audit succeeds. headers: Cache-Control: schema: {type: string, const: no-store} Pragma: schema: {type: string, const: no-cache} content: application/json: schema: type: object additionalProperties: false required: [api_version, workspace_id, application, username, password, url] properties: api_version: {type: string, const: anas.dev/api/v1} workspace_id: {type: string} application: {type: string} username: {type: string} password: {type: string} url: {type: string} "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "412": $ref: "#/components/responses/PreconditionProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "428": $ref: "#/components/responses/PreconditionRequiredProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/service/workspaces/{ws}/applications/{application}/mail-ingress-install: parameters: - $ref: "#/components/parameters/WorkspaceID" - name: application in: path required: true schema: {type: string, const: mail} post: operationId: installServiceMailIngress summary: Install or configure a restricted mail ingress source description: | Full-state direct TLS only. Requires the exact mail.ingress.install service grant for this workspace and the mail resource. The calling service authenticates the human administrator for each step; actor is declared audit context and is not a user authentication claim. Provider tokens are private request inputs and are never returned. Preparing or committing configuration does not imply deployment or email delivery. A vps-ssh Cloudflare-forwarding request must supply account_id, zone_id, forward_domain, routing_token and destination_token together; direct VPS requests must omit them. The two provider tokens must be distinct. tags: [Service] security: - serviceBearer: [] x-anas-permission: mail.ingress.install x-anas-scope: workspace x-anas-listeners: [direct] x-anas-state-access: full: {authentication: service, transports: [tls]} requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [actor, action, operation_id, domains, allowed_domains, drain_ids, capacity_bytes, total_capacity_bytes, delivered_days] oneOf: - required: [account_id, worker, bucket, zone_id, routing_token] properties: provider: {type: string, enum: [worker-r2]} action: {type: string, enum: [prepare, commit]} - required: [provider, source_id, generation, source_origin, reader_token, control_token] properties: provider: {type: string, const: cloud-relay} action: {type: string, enum: [prepare, commit]} - required: [provider, source_origin, ssh_host, ssh_port, ssh_user, ssh_host_key, ssh_private_key, tls_certificate, tls_private_key, smtp_hostname] properties: provider: {type: string, const: vps-ssh} properties: actor: {type: string, minLength: 1, maxLength: 256} action: {type: string, enum: [publish, activate, prepare, commit]} provider: {type: string, enum: [worker-r2, cloud-relay, vps-ssh]} operation_id: {type: string} account_id: {type: string} worker: {type: string} bucket: {type: string} zone_id: {type: string} domains: {type: array, minItems: 1, maxItems: 100, items: {type: string}} allowed_domains: {type: array, minItems: 1, maxItems: 100, items: {type: string}} drain_ids: {type: array, maxItems: 8, items: {type: string}} capacity_bytes: {type: integer, minimum: 1} total_capacity_bytes: {type: integer, minimum: 1} delivered_days: {type: integer, minimum: 1, maximum: 3650} notification_origin: {type: string} deployment_token: {type: string, writeOnly: true} routing_token: {type: string, writeOnly: true} source_id: {type: string, format: uuid} generation: {type: string, format: uuid} source_origin: {type: string} reader_token: {type: string, writeOnly: true} control_token: {type: string, writeOnly: true} notification_token: {type: string, writeOnly: true} ipv4_only: {type: boolean} ssh_host: {type: string, minLength: 1, maxLength: 253} ssh_port: {type: integer, minimum: 1, maximum: 65535} ssh_user: {type: string, minLength: 1, maxLength: 32} ssh_host_key: {type: string, minLength: 1, maxLength: 8192} ssh_private_key: {type: string, writeOnly: true, minLength: 1, maxLength: 65536} tls_certificate: {type: string, minLength: 1, maxLength: 32768} tls_private_key: {type: string, writeOnly: true, minLength: 1, maxLength: 32768} smtp_hostname: {type: string, minLength: 1, maxLength: 253} forward_domain: {type: string, minLength: 1, maxLength: 253} destination_token: {type: string, writeOnly: true, minLength: 20, maxLength: 256} responses: "200": description: Step confirmed; not delivery readiness. content: application/json: schema: type: object additionalProperties: false required: [state, source_id] properties: state: {type: string, enum: [published, activated, prepared, configured]} source_id: {type: string} "400": {$ref: "#/components/responses/BadRequestProblem"} "401": {$ref: "#/components/responses/UnauthorizedProblem"} "403": {$ref: "#/components/responses/ForbiddenProblem"} "404": {$ref: "#/components/responses/NotFoundProblem"} "405": {$ref: "#/components/responses/PostMethodNotAllowedProblem"} "408": {$ref: "#/components/responses/RequestCanceledProblem"} "409": {$ref: "#/components/responses/ConflictProblem"} "413": {$ref: "#/components/responses/PayloadTooLargeProblem"} "415": {$ref: "#/components/responses/UnsupportedMediaTypeProblem"} "500": {$ref: "#/components/responses/InternalProblem"} "503": {$ref: "#/components/responses/ServiceUnavailableProblem"} "504": {$ref: "#/components/responses/DeadlineProblem"} /api/v1/service/workspaces/{ws}/applications/{application}/mail-outbound-configure: parameters: - $ref: "#/components/parameters/WorkspaceID" - name: application in: path required: true schema: {type: string, const: mail} post: operationId: configureServiceMailOutbound summary: Save the explicit default mail sending profile description: | Full-state direct TLS only. Requires a separate mail.outbound.configure service grant scoped to this workspace and mail. The calling service authenticates its administrator; actor is declared audit context, not proof of human authorization. The password is a private request input. The host preserves sender-domain overrides and only commits workspace configuration. It does not deploy DMS or dispose of queued messages; a successful response does not prove delivery or readiness. An unknown response must not be treated as a failed commit or blindly retried. tags: [Service] security: - serviceBearer: [] x-anas-permission: mail.outbound.configure x-anas-scope: workspace x-anas-listeners: [direct] x-anas-state-access: full: {authentication: service, transports: [tls]} requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [actor, operation_id, provider] properties: actor: {type: string, minLength: 1, maxLength: 256} operation_id: {type: string, pattern: '^cfg-[a-f0-9]{32}$'} provider: {type: string, enum: [direct, resend, smtp]} host: {type: string} port: {type: integer, minimum: 0, maximum: 65535} tls: {type: string, enum: ['', starttls, tls]} username: {type: string} password: {type: string, writeOnly: true} responses: "200": description: Workspace configuration saved; not delivery readiness. content: application/json: schema: type: object additionalProperties: false required: [state] properties: state: {type: string, const: configured} "400": {$ref: "#/components/responses/BadRequestProblem"} "401": {$ref: "#/components/responses/UnauthorizedProblem"} "403": {$ref: "#/components/responses/ForbiddenProblem"} "404": {$ref: "#/components/responses/NotFoundProblem"} "405": {$ref: "#/components/responses/PostMethodNotAllowedProblem"} "408": {$ref: "#/components/responses/RequestCanceledProblem"} "409": {$ref: "#/components/responses/ConflictProblem"} "413": {$ref: "#/components/responses/PayloadTooLargeProblem"} "415": {$ref: "#/components/responses/UnsupportedMediaTypeProblem"} "500": {$ref: "#/components/responses/InternalProblem"} "503": {$ref: "#/components/responses/ServiceUnavailableProblem"} "504": {$ref: "#/components/responses/DeadlineProblem"} /api/v1/workspaces/{ws}/host/actions/incus.status: parameters: - $ref: "#/components/parameters/WorkspaceID" post: operationId: invokeHostIncusPreflight summary: Enqueue the installed read-only Incus host preflight description: | Optional surface, absent unless host_actions is explicitly enabled and the non-root daemon's shared host execution service started. Accepts only an empty JSON object (maximum 4096 bytes), never a command, path, credential, peer identity or installation parameter. Owner TLS, the normal session CSRF/Origin checks and a registered workspace are required on both direct and trusted-proxy listeners. A 202 response is durable queue admission, not successful execution or compute readiness. Idempotency keys are scoped to incus.status, not actor or transport; identical in-flight requests coalesce. Conflicting workspace or frozen release bindings return 409 without disclosing another job identifier. Execution outlives this HTTP request. Read completion at the existing job endpoint. Only queued jobs may be explicitly cancelled; running preflight has no cooperative cancellation and returns 409 to cancel. No package installation, configuration, uninstallation or ingress action is exposed by this route. tags: [Jobs] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: host.preflight x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: type: object additionalProperties: false maxProperties: 0 responses: "202": description: Durable new or reused job; this is not a completion receipt. headers: Location: required: true schema: type: string pattern: '^/api/v1/jobs/[A-Za-z0-9._-]+$' content: application/json: schema: $ref: "#/components/schemas/JobDetailResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "409": $ref: "#/components/responses/ConflictProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/host/actions/incus/{phase}/plan: parameters: - $ref: "#/components/parameters/WorkspaceID" - name: phase in: path required: true schema: {type: string, enum: [install, configure, enroll, uninstall]} post: operationId: planIncusHostAction summary: Enqueue a typed Incus host provisioning plan tags: [Jobs] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: host.preflight x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: type: object required: [request] additionalProperties: false properties: request: $ref: "#/components/schemas/IncusHostRequest" responses: "202": {$ref: "#/components/responses/AcceptedHostActionJob"} "400": {$ref: "#/components/responses/BadRequestProblem"} "401": {$ref: "#/components/responses/UnauthorizedProblem"} "403": {$ref: "#/components/responses/ForbiddenProblem"} "404": {$ref: "#/components/responses/NotFoundProblem"} "405": {$ref: "#/components/responses/PostMethodNotAllowedProblem"} "408": {$ref: "#/components/responses/RequestCanceledProblem"} "409": {$ref: "#/components/responses/ConflictProblem"} "413": {$ref: "#/components/responses/PayloadTooLargeProblem"} "415": {$ref: "#/components/responses/UnsupportedMediaTypeProblem"} "429": {$ref: "#/components/responses/TooManyRequestsProblem"} "500": {$ref: "#/components/responses/InternalProblem"} "503": {$ref: "#/components/responses/ServiceUnavailableProblem"} "504": {$ref: "#/components/responses/DeadlineProblem"} /api/v1/workspaces/{ws}/host/actions/incus/image-prune/plan: parameters: - $ref: "#/components/parameters/WorkspaceID" post: operationId: planIncusImagePrune summary: Enqueue a typed Incus image prune dry-run tags: [Jobs] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: host.preflight x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: type: object additionalProperties: false maxProperties: 0 responses: "202": {$ref: "#/components/responses/AcceptedHostActionJob"} "400": {$ref: "#/components/responses/BadRequestProblem"} "401": {$ref: "#/components/responses/UnauthorizedProblem"} "403": {$ref: "#/components/responses/ForbiddenProblem"} "404": {$ref: "#/components/responses/NotFoundProblem"} "405": {$ref: "#/components/responses/PostMethodNotAllowedProblem"} "408": {$ref: "#/components/responses/RequestCanceledProblem"} "409": {$ref: "#/components/responses/ConflictProblem"} "413": {$ref: "#/components/responses/PayloadTooLargeProblem"} "415": {$ref: "#/components/responses/UnsupportedMediaTypeProblem"} "429": {$ref: "#/components/responses/TooManyRequestsProblem"} "500": {$ref: "#/components/responses/InternalProblem"} "503": {$ref: "#/components/responses/ServiceUnavailableProblem"} "504": {$ref: "#/components/responses/DeadlineProblem"} /api/v1/workspaces/{ws}/host/actions/confirm: parameters: - $ref: "#/components/parameters/WorkspaceID" post: operationId: issueHostActionConfirmation summary: Issue a five-minute one-time host action confirmation tags: [Jobs] parameters: - $ref: "#/components/parameters/Origin" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: host.preflight x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: type: object required: [plan_job_id, action] additionalProperties: false properties: plan_job_id: {type: string} action: {type: string, enum: [incus.install, incus.configure, incus.enroll, incus.uninstall, incus.image-prune]} responses: "201": description: Confirmation token returned once; plaintext is not persisted. content: application/json: schema: type: object required: [api_version, token, binding_digest, expires_at] properties: api_version: {type: string} token: {type: string} binding_digest: {type: string, pattern: "^[0-9a-f]{64}$"} expires_at: {type: string, format: date-time} "400": {$ref: "#/components/responses/BadRequestProblem"} "401": {$ref: "#/components/responses/UnauthorizedProblem"} "403": {$ref: "#/components/responses/ForbiddenProblem"} "404": {$ref: "#/components/responses/NotFoundProblem"} "405": {$ref: "#/components/responses/PostMethodNotAllowedProblem"} "408": {$ref: "#/components/responses/RequestCanceledProblem"} "409": {$ref: "#/components/responses/ConflictProblem"} "413": {$ref: "#/components/responses/PayloadTooLargeProblem"} "415": {$ref: "#/components/responses/UnsupportedMediaTypeProblem"} "429": {$ref: "#/components/responses/TooManyRequestsProblem"} "500": {$ref: "#/components/responses/InternalProblem"} "503": {$ref: "#/components/responses/ServiceUnavailableProblem"} "504": {$ref: "#/components/responses/DeadlineProblem"} /api/v1/workspaces/{ws}/host/actions/incus/{phase}/apply: parameters: - $ref: "#/components/parameters/WorkspaceID" - name: phase in: path required: true schema: {type: string, enum: [install, configure, enroll, uninstall]} post: operationId: applyIncusHostAction summary: Enqueue a confirmed Incus host provisioning action tags: [Jobs] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: host.preflight x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: type: object required: [plan_job_id, confirmation_token, parameters] additionalProperties: false properties: plan_job_id: {type: string} confirmation_token: {type: string} parameters: description: Copy from the completed plan. A token does not override plan blockers. $ref: "#/components/schemas/IncusHostApplyParameters" responses: "202": {$ref: "#/components/responses/AcceptedHostActionJob"} "400": {$ref: "#/components/responses/BadRequestProblem"} "401": {$ref: "#/components/responses/UnauthorizedProblem"} "403": {$ref: "#/components/responses/ForbiddenProblem"} "404": {$ref: "#/components/responses/NotFoundProblem"} "405": {$ref: "#/components/responses/PostMethodNotAllowedProblem"} "408": {$ref: "#/components/responses/RequestCanceledProblem"} "409": {$ref: "#/components/responses/ConflictProblem"} "413": {$ref: "#/components/responses/PayloadTooLargeProblem"} "415": {$ref: "#/components/responses/UnsupportedMediaTypeProblem"} "429": {$ref: "#/components/responses/TooManyRequestsProblem"} "500": {$ref: "#/components/responses/InternalProblem"} "503": {$ref: "#/components/responses/ServiceUnavailableProblem"} "504": {$ref: "#/components/responses/DeadlineProblem"} /api/v1/workspaces/{ws}/host/actions/incus/image-prune/apply: parameters: - $ref: "#/components/parameters/WorkspaceID" post: operationId: applyIncusImagePrune summary: Enqueue a confirmed Incus image prune action tags: [Jobs] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: host.preflight x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: type: object required: [plan_job_id, confirmation_token] additionalProperties: false properties: plan_job_id: {type: string} confirmation_token: {type: string} responses: "202": {$ref: "#/components/responses/AcceptedHostActionJob"} "400": {$ref: "#/components/responses/BadRequestProblem"} "401": {$ref: "#/components/responses/UnauthorizedProblem"} "403": {$ref: "#/components/responses/ForbiddenProblem"} "404": {$ref: "#/components/responses/NotFoundProblem"} "405": {$ref: "#/components/responses/PostMethodNotAllowedProblem"} "408": {$ref: "#/components/responses/RequestCanceledProblem"} "409": {$ref: "#/components/responses/ConflictProblem"} "413": {$ref: "#/components/responses/PayloadTooLargeProblem"} "415": {$ref: "#/components/responses/UnsupportedMediaTypeProblem"} "429": {$ref: "#/components/responses/TooManyRequestsProblem"} "500": {$ref: "#/components/responses/InternalProblem"} "503": {$ref: "#/components/responses/ServiceUnavailableProblem"} "504": {$ref: "#/components/responses/DeadlineProblem"} /: get: operationId: getConsole summary: Serve the console shell or redirect an enrolled plaintext request description: | M0/bootstrap plaintext and all allowed TLS requests receive the embedded main console shell. Enrollment/full plaintext requests are redirected to the canonical HTTPS origin from root-owned service configuration. Credentialed/body-carrying full plaintext requests remain hidden with 404, and no query or user-controlled host value is propagated. tags: [Console] security: [] x-anas-permission: console.ui.read x-anas-scope: service x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} bootstrap: {authentication: none, transports: [plaintext, tls]} enrollment: {authentication: none, transports: [plaintext, tls]} full: {authentication: none, transports: [plaintext, tls]} responses: "200": description: Embedded main console HTML. content: text/html: schema: type: string "308": description: Redirect to the configured canonical HTTPS origin root. headers: Location: required: true schema: type: string format: uri "400": $ref: "#/components/responses/BadRequestProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "500": $ref: "#/components/responses/InternalProblem" /assets/main.js: get: operationId: getConsoleMainJavaScript summary: Read the embedded main console JavaScript bundle tags: [Console] security: [] x-anas-permission: console.ui.read x-anas-scope: service x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} bootstrap: {authentication: none, transports: [plaintext, tls]} enrollment: {authentication: none, transports: [tls]} full: {authentication: none, transports: [tls]} responses: "200": description: Embedded ECMAScript module. content: text/javascript: schema: {type: string} "400": $ref: "#/components/responses/BadRequestProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "500": $ref: "#/components/responses/InternalProblem" /assets/main.css: get: operationId: getConsoleMainStyles summary: Read the embedded main console stylesheet tags: [Console] security: [] x-anas-permission: console.ui.read x-anas-scope: service x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} bootstrap: {authentication: none, transports: [plaintext, tls]} enrollment: {authentication: none, transports: [tls]} full: {authentication: none, transports: [tls]} responses: "200": description: Embedded main console stylesheet. content: text/css: schema: {type: string} "400": $ref: "#/components/responses/BadRequestProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "500": $ref: "#/components/responses/InternalProblem" /emergency: get: operationId: getConsoleRecovery summary: Serve the independent recovery interface description: This package uses browser APIs only and does not import the main Vue bundle. tags: [Console] security: [] x-anas-permission: console.ui.read x-anas-scope: service x-anas-listeners: [direct] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} bootstrap: {authentication: none, transports: [plaintext, tls]} enrollment: {authentication: none, transports: [tls]} full: {authentication: none, transports: [tls]} responses: "200": description: Embedded recovery HTML. content: text/html: schema: {type: string} "400": $ref: "#/components/responses/BadRequestProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "500": $ref: "#/components/responses/InternalProblem" /assets/emergency.js: get: operationId: getConsoleRecoveryJavaScript summary: Read the independent recovery JavaScript bundle tags: [Console] security: [] x-anas-permission: console.ui.read x-anas-scope: service x-anas-listeners: [direct] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} bootstrap: {authentication: none, transports: [plaintext, tls]} enrollment: {authentication: none, transports: [tls]} full: {authentication: none, transports: [tls]} responses: "200": description: Embedded recovery ECMAScript module. content: text/javascript: schema: {type: string} "400": $ref: "#/components/responses/BadRequestProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "500": $ref: "#/components/responses/InternalProblem" /assets/emergency.css: get: operationId: getConsoleRecoveryStyles summary: Read the independent recovery stylesheet tags: [Console] security: [] x-anas-permission: console.ui.read x-anas-scope: service x-anas-listeners: [direct] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} bootstrap: {authentication: none, transports: [plaintext, tls]} enrollment: {authentication: none, transports: [tls]} full: {authentication: none, transports: [tls]} responses: "200": description: Embedded recovery stylesheet. content: text/css: schema: {type: string} "400": $ref: "#/components/responses/BadRequestProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "500": $ref: "#/components/responses/InternalProblem" /healthz: get: operationId: getHealth summary: Check whether the daemon is alive description: Does not inspect Docker, Btrfs, tools, or any workspace. tags: [Service] security: [] x-anas-permission: public x-anas-scope: service x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} bootstrap: {authentication: none, transports: [plaintext, tls]} enrollment: {authentication: none, transports: [plaintext, tls]} full: {authentication: none, transports: [plaintext, tls]} responses: "200": description: The daemon is alive. content: application/json: schema: $ref: "#/components/schemas/HealthResponse" "400": $ref: "#/components/responses/BadRequestProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "500": $ref: "#/components/responses/InternalProblem" /api/v1/system: get: operationId: getSystem summary: Read daemon build information and current capabilities tags: [Service] security: [] x-anas-permission: public x-anas-scope: service x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} bootstrap: {authentication: none, transports: [plaintext, tls]} enrollment: {authentication: none, transports: [plaintext, tls]} full: {authentication: none, transports: [tls]} responses: "200": description: Build information, capability flags, and registered workspace IDs. content: application/json: schema: $ref: "#/components/schemas/SystemResponse" "400": $ref: "#/components/responses/BadRequestProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/system/ca: get: operationId: downloadInternalCA summary: Download the validated public ANAS internal CA description: | Returns only the independently configured and TLS-manager-validated `anas-internal-ca.crt`; no filesystem path or private material is exposed. The CA remains available when the serving issuer is ACME. tags: [Service] security: - {} - localSessionCookie: [] x-anas-permission: system.ca.read x-anas-scope: service x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: enrollment: {authentication: none, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} responses: "200": description: The public internal trust anchor. headers: Content-Disposition: required: true schema: type: string const: 'attachment; filename="anas-internal-ca.crt"' content: application/pem-certificate-chain: schema: type: string contentMediaType: application/pem-certificate-chain "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" /api/v1/auth/csrf: get: operationId: issuePreAuthCSRF summary: Issue a short-lived pre-authentication CSRF token description: | Sets a host-only, HttpOnly, SameSite=Strict `anas_preauth_csrf` cookie and returns the same value in `csrf_token`. The caller must send both values, unchanged, when exchanging a bootstrap token or logging in. The cookie is Secure in enrollment and full states, but is intentionally not Secure during plaintext bootstrap. tags: [Authentication] security: [] x-anas-permission: auth.csrf x-anas-scope: service x-anas-listeners: [direct] x-anas-state-access: bootstrap: {authentication: none, transports: [plaintext, tls]} enrollment: {authentication: none, transports: [tls]} full: {authentication: none, transports: [tls]} responses: "200": description: A pre-authentication CSRF token valid for ten minutes. headers: Set-Cookie: description: Host-only `anas_preauth_csrf`; HttpOnly; SameSite=Strict; Path=/; no Domain; Secure except during bootstrap. schema: type: string content: application/json: schema: $ref: "#/components/schemas/CSRFResponse" "400": $ref: "#/components/responses/BadRequestProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "500": $ref: "#/components/responses/InternalProblem" /api/v1/auth/session: get: operationId: refreshAuthSession summary: Recover an authenticated browser session and rotate its CSRF token description: | Uses only the host-only HttpOnly bootstrap or local-owner session cookie. The exact request origin must still match the durable session binding. On success, atomically invalidates the previous SPA-visible CSRF value, returns a replacement, and extends only the idle lifetime without changing the absolute session expiry. The response is never cacheable. tags: [Authentication] security: - bootstrapSessionCookie: [] - localSessionCookie: [] x-anas-permission: auth.session.refresh x-anas-scope: service x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: bootstrap: {authentication: bootstrap, transports: [plaintext, tls]} enrollment: {authentication: bootstrap, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} responses: "200": description: The existing authenticated session was recovered and its CSRF token was rotated. content: application/json: schema: $ref: "#/components/schemas/SessionRefreshResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" /api/v1/auth/bootstrap/exchange: post: operationId: exchangeBootstrapToken summary: Atomically exchange a one-use bootstrap token for a session description: | Requires an exact same-origin `Origin` header plus the same CSRF value in the `anas_preauth_csrf` cookie and `X-CSRF-Token` header. On success, consumes the bootstrap token, deletes the pre-authentication cookie, and sets the host-only `anas_bootstrap_session` cookie. The session token is never returned in the JSON response. tags: [Authentication] parameters: - $ref: "#/components/parameters/Origin" security: - preAuthCSRFCookie: [] csrfHeader: [] x-anas-permission: auth.bootstrap.exchange x-anas-scope: service x-anas-listeners: [direct] x-anas-state-access: bootstrap: {authentication: none, transports: [plaintext, tls]} enrollment: {authentication: none, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BootstrapExchangeRequest" responses: "200": description: The bootstrap session was created and the one-use token was consumed. headers: Set-Cookie: description: Host-only `anas_bootstrap_session` plus deletion of `anas_preauth_csrf`; HttpOnly; SameSite=Strict; Path=/; no Domain; Secure in enrollment. schema: type: string content: application/json: schema: $ref: "#/components/schemas/BootstrapSessionResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" /api/v1/auth/enrollment/handoffs: post: operationId: issueEnrollmentHandoff summary: Issue a one-use handoff bound to the validated TLS endpoint description: | Requires the promoted bootstrap session, its session-bound CSRF token, and the exact source Origin. The server selects the validated target origin and certificate SPKI digest; clients cannot override either binding. The returned handoff is short-lived and shown only once. tags: [Authentication] parameters: - $ref: "#/components/parameters/Origin" security: - bootstrapSessionCookie: [] csrfHeader: [] x-anas-permission: auth.enrollment.handoff x-anas-scope: service x-anas-listeners: [direct] x-anas-state-access: enrollment: {authentication: bootstrap, transports: [plaintext, tls]} responses: "201": description: A certificate-bound, one-use enrollment handoff was issued. content: application/json: schema: $ref: "#/components/schemas/EnrollmentHandoffResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "409": $ref: "#/components/responses/ConflictProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" /api/v1/auth/enrollment/exchange: post: operationId: exchangeEnrollmentHandoff summary: Exchange a certificate-bound handoff for an enrollment session description: | Accepts only a form-encoded handoff and an exact canonical source Origin. Cookies, Authorization headers, query parameters, target-origin input, and SPKI input are rejected. The request must arrive at the validated TLS origin to which the handoff was bound. Success sets both an HttpOnly enrollment session cookie and a separate same-origin SPA-readable CSRF cookie, then redirects to the target origin root. No credential is returned in the URL or a JSON response. tags: [Authentication] parameters: - $ref: "#/components/parameters/Origin" security: [] x-anas-permission: auth.enrollment.exchange x-anas-scope: service x-anas-listeners: [direct] x-anas-state-access: enrollment: {authentication: none, transports: [tls]} requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: "#/components/schemas/EnrollmentHandoffExchangeRequest" responses: "303": description: The handoff was consumed, a TLS-only enrollment session was created, and the browser is redirected to the target origin root. headers: Set-Cookie: description: >- Two host-only cookies: HttpOnly `__Host-anas_enrollment_session` and SPA-readable `__Host-anas_enrollment_csrf`; both Secure; SameSite=Strict; Path=/; no Domain. schema: type: string Location: description: Absolute URL of the validated target origin root. schema: type: string format: uri pattern: "^https://[^/]+/$" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "409": $ref: "#/components/responses/ConflictProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedFormMediaTypeProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" /api/v1/auth/enrollment/owner: post: operationId: createInitialLocalOwner summary: Atomically create the initial local owner and enter full mode description: | Requires the TLS-only enrollment session, an exact match between the SPA-readable enrollment CSRF cookie and `X-CSRF-Token`, validation of that CSRF value against the server-side session digest, the exact enrollment transaction, and an exact same-origin Origin. Owner persistence, credential revocation, and the state transition use a recoverable commit so a restart cannot expose a partial result. tags: [Authentication] parameters: - $ref: "#/components/parameters/Origin" security: - enrollmentSessionCookie: [] enrollmentCSRFCookie: [] csrfHeader: [] x-anas-permission: auth.enrollment.owner x-anas-scope: service x-anas-listeners: [direct] x-anas-state-access: enrollment: {authentication: enrollment, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/EnrollmentOwnerRequest" responses: "201": description: The initial owner was created, enrollment credentials were revoked, and full mode was published. headers: Set-Cookie: description: Deletion of the enrollment session, enrollment CSRF, and promoted bootstrap session cookies. schema: type: string content: application/json: schema: $ref: "#/components/schemas/EnrollmentOwnerResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" /api/v1/auth/login: post: operationId: loginLocalOwner summary: Create a local-owner session on the direct TLS listener description: | Requires an exact same-origin `Origin` header and pre-authentication double-submit CSRF. On success, deletes the pre-authentication cookie and sets a host-only, Secure, HttpOnly, SameSite=Strict `__Host-anas_local_session` cookie. The session token is never returned in JSON. tags: [Authentication] parameters: - $ref: "#/components/parameters/Origin" security: - preAuthCSRFCookie: [] csrfHeader: [] x-anas-permission: auth.local.login x-anas-scope: service x-anas-listeners: [direct] x-anas-state-access: full: {authentication: none, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LocalLoginRequest" responses: "200": description: A local-owner session was created. headers: Set-Cookie: description: Host-only `__Host-anas_local_session` plus deletion of `anas_preauth_csrf`; Secure; HttpOnly; SameSite=Strict; Path=/; no Domain. schema: type: string content: application/json: schema: $ref: "#/components/schemas/LocalSessionResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" /api/v1/auth/logout: post: operationId: logoutLocalOwner summary: Revoke the current local-owner session description: Requires the session-bound CSRF token and an exact same-origin `Origin` header. tags: [Authentication] parameters: - $ref: "#/components/parameters/Origin" security: - localSessionCookie: [] csrfHeader: [] x-anas-permission: auth.local.logout x-anas-scope: service x-anas-listeners: [direct] x-anas-state-access: full: {authentication: owner, transports: [tls]} responses: "204": description: The session was revoked; the response has no body. headers: Set-Cookie: description: Deletes the host-only `__Host-anas_local_session` cookie using Secure; HttpOnly; SameSite=Strict; Path=/; no Domain. schema: type: string "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" /api/v1/auth/step-up: post: operationId: issueLocalStepUp summary: Re-verify the local owner and issue a deployment step-up proof description: | Full-state direct-listener only. Re-verifies the current local-owner password, resolves the registered workspace, and computes the current deployment-plan state binding on the server. The returned 256-bit proof expires within five minutes and is bound to the current session, action, workspace, optional deployment ID, config validator, and plan digest. Only its digest and binding are persisted. The password and raw proof never enter audit or job records. Trusted-proxy identities cannot use this route and must wait for the recent-auth assertion contract. tags: [Authentication] parameters: - $ref: "#/components/parameters/Origin" security: - localSessionCookie: [] csrfHeader: [] x-anas-permission: auth.step_up x-anas-scope: service x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LocalStepUpRequest" responses: "200": description: A short-lived, one-use, session- and state-bound step-up proof. content: application/json: schema: $ref: "#/components/schemas/LocalStepUpResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/audit-events: get: operationId: listAuditEvents summary: List durable audit events visible to the current owner description: | Returns retained events newest first from the verified audit store. Service-wide events and events for currently registered workspaces are visible to a full-state owner; events naming an unregistered workspace are filtered before pagination. The opaque cursor continues after the last event in the preceding page. Configuration attempt, authorized, and terminal records remain separate evidence; a missing terminal is never interpreted as success or failure, and `indeterminate` remains a distinct recorded outcome. tags: [Audit] security: - localSessionCookie: [] x-anas-permission: audit.list x-anas-scope: service x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} parameters: - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" responses: "200": description: One authorization-filtered page of retained audit events. content: application/json: schema: $ref: "#/components/schemas/AuditEventListResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/jobs: get: operationId: listJobs summary: List durable jobs visible to the current principal description: | Returns newest jobs first. Bootstrap and enrollment recovery sessions see only jobs created for the same transaction. A full owner sees jobs for every workspace still registered by the server. Filtering happens before pagination, and the cursor is an opaque stable continuation. tags: [Jobs] security: - bootstrapSessionCookie: [] - localSessionCookie: [] x-anas-permission: job.list x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: bootstrap: {authentication: bootstrap, transports: [plaintext, tls]} enrollment: {authentication: bootstrap, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} parameters: - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" responses: "200": description: One authorization-filtered page of durable job summaries. content: application/json: schema: $ref: "#/components/schemas/JobListResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/jobs/{id}: parameters: - $ref: "#/components/parameters/JobID" get: operationId: getJob summary: Read a durable job and its safe final outcome description: | Applies the same workspace and principal scope as the list endpoint. The transport projection deliberately omits the persisted request and raw creator identity while retaining safe warnings, result, and error. tags: [Jobs] security: - bootstrapSessionCookie: [] - localSessionCookie: [] x-anas-permission: job.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: bootstrap: {authentication: bootstrap, transports: [plaintext, tls]} enrollment: {authentication: bootstrap, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} responses: "200": description: The safe projection of one authorized durable job. content: application/json: schema: $ref: "#/components/schemas/JobDetailResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/jobs/{id}/events: parameters: - $ref: "#/components/parameters/JobID" get: operationId: streamJobEvents summary: Replay and follow a durable job event stream description: | Replays persisted events after Last-Event-ID, then follows the durable journal with heartbeat comments. Each event uses its durable numeric ID. A terminal job closes once all retained events have been replayed. A subsequent request whose Last-Event-ID is caught up, or a terminal job with no replayable events, returns 204 so browser EventSource clients stop reconnecting. An expired cursor returns a machine-readable 410 problem before streaming; a retention gap detected later is emitted as an SSE `gap` event before the connection closes. SSE connections have an explicit process-wide limit and per-write deadline independent of ordinary JSON timeouts. While a stream is open, every replay batch, poll, and heartbeat boundary rechecks the current capability state, the same route policy, the live session, and job-object authorization without extending session idle expiry. Revocation, expiry, password rotation, a capability-state change, or loss of object access closes the established stream without an SSE authentication error payload. tags: [Jobs] security: - bootstrapSessionCookie: [] - localSessionCookie: [] x-anas-permission: job.events.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: bootstrap: {authentication: bootstrap, transports: [plaintext, tls]} enrollment: {authentication: bootstrap, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} parameters: - $ref: "#/components/parameters/LastEventID" responses: "200": description: A replayed and optionally live Server-Sent Event stream. content: text/event-stream: schema: type: string "204": description: The terminal job has no events to replay beyond the supplied cursor; EventSource clients stop reconnecting. The response has no body. "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "406": $ref: "#/components/responses/NotAcceptableProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "410": $ref: "#/components/responses/EventGapProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/jobs/{id}/cancel: parameters: - $ref: "#/components/parameters/JobID" post: operationId: cancelJob summary: Cancel a queued job or request cancellation at a safe execution stage description: | Queued jobs transition directly to canceled. A running job accepts the request only while its executor-owned context is registered at a safe stage; otherwise the request returns 409 without changing execution. Accepted running cancellation sends TERM to each active external command process group, waits the grace period, sends KILL, and runs the workspace compensation check before clearing its durable marker. tags: [Jobs] parameters: - $ref: "#/components/parameters/Origin" security: - bootstrapSessionCookie: [] csrfHeader: [] - enrollmentSessionCookie: [] csrfHeader: [] - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: job.cancel x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: bootstrap: {authentication: bootstrap, transports: [plaintext, tls]} enrollment: {authentication: bootstrap, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/EmptyObject" responses: "202": description: The queued job was canceled or a safe-stage cancellation request was delivered. headers: Location: description: Relative URL of the durable job resource. required: true schema: type: string pattern: "^/api/v1/jobs/[^/]+$" content: application/json: schema: $ref: "#/components/schemas/JobDetailResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "409": $ref: "#/components/responses/ConflictProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/plans: parameters: - $ref: "#/components/parameters/WorkspaceID" post: operationId: planWorkspaceDeployment summary: Compute and durably record a deployment plan description: | Computes against the registered workspace and its immutable Module view, without changing the running environment. The succeeded plan job and every lifecycle transition are durably audited before commit. The response contains a 256-bit one-use confirmation proof; only its digest and exact actor/source/transaction/workspace/config/plan binding are persisted. Host paths and internal content digests are never returned. tags: [Deployments] parameters: - $ref: "#/components/parameters/Origin" security: - bootstrapSessionCookie: [] csrfHeader: [] - localSessionCookie: [] csrfHeader: [] x-anas-permission: deployment.plan x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: bootstrap: {authentication: bootstrap, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} requestBody: required: false content: application/json: schema: $ref: "#/components/schemas/DeploymentPlanRequest" responses: "200": description: A completed durable plan and short-lived one-use confirmation. content: application/json: schema: $ref: "#/components/schemas/DeploymentPlanResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "428": $ref: "#/components/responses/PreconditionRequiredProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/actions/apply: parameters: - $ref: "#/components/parameters/WorkspaceID" post: operationId: applyWorkspaceDeployment summary: Consume a plan confirmation and enqueue deployment apply description: | Bootstrap uses its transaction-bound plan confirmation. Full-state direct sessions must additionally send the local step-up proof used to obtain that plan confirmation. Step-up and confirmation consumption, apply-job creation, and idempotency registration are one jobs.lock transaction preceded by a durable audit intent. Raw proofs are never persisted. An identical Idempotency-Key retry returns the original job without consuming either proof again; a changed request or a second key returns 409. Trusted-proxy full apply remains hidden. tags: [Deployments] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" security: - bootstrapSessionCookie: [] csrfHeader: [] - localSessionCookie: [] csrfHeader: [] x-anas-permission: deployment.apply x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: bootstrap: {authentication: bootstrap, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/DeploymentApplyRequest" responses: "202": description: The apply job was durably queued, or an identical existing job was returned. headers: Location: description: Relative URL of the durable job resource. required: true schema: type: string pattern: "^/api/v1/jobs/[^/]+$" content: application/json: schema: $ref: "#/components/schemas/DeploymentApplyResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "409": $ref: "#/components/responses/ConflictProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "428": $ref: "#/components/responses/PreconditionRequiredProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/modules/actions/{action}: parameters: - $ref: "#/components/parameters/WorkspaceID" - name: action in: path required: true schema: type: string enum: [start, stop, restart] post: operationId: manageWorkspaceModules summary: Preview or enqueue a dependency-safe Module lifecycle action description: | A request containing only `modules` returns the runner-expanded chain. To execute, repeat the exact deployment ID, digest, and affected Module list returned by that preview and supply Idempotency-Key. The handler recomputes the preview before enqueue, and the job-owned application service recomputes it again under the runtime lock before touching containers. An empty modules list means the whole active deployment. tags: [Modules] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/OptionalIdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: deployment.lifecycle x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LifecycleActionRequest" responses: "200": description: The current dependency-expanded action preview. content: application/json: schema: $ref: "#/components/schemas/LifecyclePreviewResponse" "202": description: The lifecycle job was durably queued, or an identical existing job was returned. headers: Location: description: Relative URL of the durable job resource. required: true schema: type: string pattern: "^/api/v1/jobs/[^/]+$" content: application/json: schema: $ref: "#/components/schemas/DeploymentApplyResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "409": $ref: "#/components/responses/ConflictProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "428": $ref: "#/components/responses/PreconditionRequiredProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/modules: parameters: - $ref: "#/components/parameters/WorkspaceID" get: operationId: listWorkspaceModules summary: List configured, installed, deployed, and live Module state description: | Combines the managed configuration, immutable Module view, active deployment manifest, and live container status without exposing host paths. The strong ETag is the current managed-config generation and is required by Module enable and disable actions. tags: [Modules] parameters: - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" security: - localSessionCookie: [] - proxySessionCookie: [] x-anas-permission: module.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} responses: "200": description: Public Module state in canonical Module-name order. headers: ETag: $ref: "#/components/headers/ManagedConfigETag" content: application/json: schema: $ref: "#/components/schemas/ModuleListResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "412": $ref: "#/components/responses/PreconditionProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/compute/leases: parameters: - $ref: "#/components/parameters/WorkspaceID" get: operationId: listWorkspaceComputeLeases summary: Read the network view of every compute lease description: | Read-only lease network view (INCUS-R-128). For each compute lease in the active deployment it returns the lease bridge, subnets and gateways the Provider reported, the frozen egress and ingress tiers and switches, HTTP publications, port bindings with their slot addresses, the lease's instances and their addresses, and the directions the tiers allow or deny. The instance list is read live with the lease's own project-scoped certificate; when the daemon cannot be reached the lease carries instances_error instead. No credential, key or certificate is returned, and nothing here changes a lease. tags: [Modules] security: - localSessionCookie: [] - proxySessionCookie: [] x-anas-permission: module.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} responses: "200": description: Lease network view in active-deployment resource order. content: application/json: schema: $ref: "#/components/schemas/ComputeLeaseNetworkResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/catalog/modules: get: operationId: listModuleCatalog summary: Read the Module catalog selected by a workspace description: | `workspace_id` selects a registered workspace and therefore its root-managed Module source policy. It may be omitted only when exactly one workspace is registered. Source profiles and cache paths cannot be supplied by the caller. tags: [Modules] parameters: - name: workspace_id in: query required: false schema: type: string minLength: 1 maxLength: 64 pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" security: - localSessionCookie: [] - proxySessionCookie: [] x-anas-permission: module.catalog.read x-anas-scope: service x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} responses: "200": description: Public catalog metadata and available Module releases. content: application/json: schema: $ref: "#/components/schemas/ModuleCatalogResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "412": $ref: "#/components/responses/PreconditionProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/actions/update-modules: parameters: - $ref: "#/components/parameters/WorkspaceID" post: operationId: updateWorkspaceModules summary: Enqueue Module synchronization or catalog update description: | `sync` restores the immutable workspace view from its exact lock. `update` refreshes selected Modules (or all selected Modules when the array is omitted) from the workspace's configured source. Both modes are durable, idempotent, single-writer jobs. tags: [Modules] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: module.update x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ModuleUpdateRequest" responses: "202": description: The Module job was durably queued, or an identical existing job was returned. headers: Location: description: Relative URL of the durable job resource. required: true schema: type: string pattern: "^/api/v1/jobs/[^/]+$" content: application/json: schema: $ref: "#/components/schemas/DeploymentApplyResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "409": $ref: "#/components/responses/ConflictProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/modules/{module}/actions/{action}: parameters: - $ref: "#/components/parameters/WorkspaceID" - $ref: "#/components/parameters/ModuleName" - name: action in: path required: true schema: type: string enum: [enable, disable] post: operationId: configureWorkspaceModule summary: Enqueue a CAS-protected Module enable or disable action description: | The request body must be an empty JSON object. `If-Match` must contain the strong ETag returned by the Module list. The durable job performs a second CAS check and writes fail-closed audit immediately before the existing configuration WAL publishes the new desired state. tags: [Modules] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" - $ref: "#/components/parameters/ModuleConfigIfMatch" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: module.config x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: type: object additionalProperties: false responses: "202": description: The Module configuration job was durably queued, or an identical existing job was returned. headers: Location: description: Relative URL of the durable job resource. required: true schema: type: string pattern: "^/api/v1/jobs/[^/]+$" content: application/json: schema: $ref: "#/components/schemas/DeploymentApplyResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "409": $ref: "#/components/responses/ConflictProblem" "412": $ref: "#/components/responses/PreconditionProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "428": $ref: "#/components/responses/PreconditionRequiredProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/actions/rollback: parameters: - $ref: "#/components/parameters/WorkspaceID" post: operationId: rollbackWorkspaceDeployment summary: Preview or enqueue an artifact-only deployment rollback description: | A request containing only an explicit deployment_id returns guarded changes and confirms that data is not touched. To execute, repeat the active deployment, preview digest, target deployment, and exact guarded change list, select allow_risky explicitly, and supply Idempotency-Key. The job revalidates that impact under the runtime lock. tags: [Deployments] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/OptionalIdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: deployment.rollback x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RollbackActionRequest" responses: "200": description: The current rollback impact preview. content: application/json: schema: $ref: "#/components/schemas/RollbackPreviewResponse" "202": description: The rollback job was durably queued, or an identical existing job was returned. headers: Location: description: Relative URL of the durable job resource. required: true schema: type: string pattern: "^/api/v1/jobs/[^/]+$" content: application/json: schema: $ref: "#/components/schemas/DeploymentApplyResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "409": $ref: "#/components/responses/ConflictProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "428": $ref: "#/components/responses/PreconditionRequiredProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/config: parameters: - $ref: "#/components/parameters/WorkspaceID" get: operationId: getWorkspaceConfig summary: Read the normalized desired configuration and its field metadata description: | Returns a public projection of the current desired configuration. Raw Secret Store values, `secrets`, sensitive defaults, and sensitive field values are never returned. A sensitive field is represented only by its `set` or `unset` state in the field metadata. When the configuration is already managed, the response carries the strong ETag that a subsequent PUT must copy byte-for-byte into If-Match. A first, unmanaged workspace has no ETag. The response is never cacheable. tags: [Configuration] security: - bootstrapSessionCookie: [] - localSessionCookie: [] x-anas-permission: config.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: bootstrap: {authentication: bootstrap, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} responses: "200": description: The normalized public configuration and schema projection. headers: Cache-Control: $ref: "#/components/headers/CacheControlNoStore" ETag: $ref: "#/components/headers/ManagedConfigETag" content: application/json: schema: $ref: "#/components/schemas/ConfigSnapshotResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/ConfigMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "412": $ref: "#/components/responses/PreconditionProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" put: operationId: putWorkspaceConfig summary: Atomically save a normalized desired configuration description: | Validates and saves desired state only; it does not plan, apply, or otherwise change the running environment. An already managed configuration requires exactly one strong If-Match value copied from GET. The first managed write instead requires exactly `If-None-Match: *`. Sending both header families, multiple values, or a malformed entity tag is a 400. Omitting the required family or using the family for the other lifecycle state is a 428. A weak If-Match, wildcard If-Match, non-wildcard If-None-Match, stale validator, or a manual edit to config.yml is a 412. The configuration file, Secret Store, and managed state are committed as one recoverable transaction. Each actual generation receives a fresh random opaque validator; its internal content digest is never exposed. The response is never cacheable. tags: [Configuration] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/ConfigIfMatch" - $ref: "#/components/parameters/ConfigIfNoneMatch" security: - bootstrapSessionCookie: [] csrfHeader: [] - localSessionCookie: [] csrfHeader: [] x-anas-permission: config.write x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: bootstrap: {authentication: bootstrap, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ConfigCandidate" responses: "200": description: The new managed desired configuration; no apply was started. headers: Cache-Control: $ref: "#/components/headers/CacheControlNoStore" ETag: $ref: "#/components/headers/ManagedConfigETag" content: application/json: schema: $ref: "#/components/schemas/ConfigPutResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/ConfigMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "412": $ref: "#/components/responses/PreconditionProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "428": $ref: "#/components/responses/PreconditionRequiredProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ConfigPutServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/config/validate: parameters: - $ref: "#/components/parameters/WorkspaceID" post: operationId: validateWorkspaceConfig summary: Validate a configuration draft without saving it description: | Applies the same schema, resolver, sensitive-field, and guarded-effect rules as PUT and returns the normalized public candidate plus its change plan. It returns the current base validator but deliberately does not mint a candidate validator before commit. It does not write configuration, Secret Store, managed state, jobs, or the running environment. The response is never cacheable. tags: [Configuration] parameters: - $ref: "#/components/parameters/Origin" security: - bootstrapSessionCookie: [] csrfHeader: [] - localSessionCookie: [] csrfHeader: [] x-anas-permission: config.validate x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: bootstrap: {authentication: bootstrap, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ConfigCandidate" responses: "200": description: The normalized candidate and change plan; nothing was written. headers: Cache-Control: $ref: "#/components/headers/CacheControlNoStore" content: application/json: schema: $ref: "#/components/schemas/ConfigValidationResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "412": $ref: "#/components/responses/PreconditionProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces: get: operationId: listWorkspaces summary: List registered workspace IDs without exposing host paths tags: [Workspace] parameters: - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" security: - {} - localSessionCookie: [] - proxySessionCookie: [] x-anas-permission: workspace.read x-anas-scope: service x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} responses: "200": description: One page of opaque registered workspace IDs. content: application/json: schema: $ref: "#/components/schemas/WorkspaceListResponse" "400": { $ref: "#/components/responses/BadRequestProblem" } "401": { $ref: "#/components/responses/UnauthorizedProblem" } "403": { $ref: "#/components/responses/ForbiddenProblem" } "404": { $ref: "#/components/responses/NotFoundProblem" } "405": { $ref: "#/components/responses/GetMethodNotAllowedProblem" } "408": { $ref: "#/components/responses/RequestCanceledProblem" } "500": { $ref: "#/components/responses/InternalProblem" } "504": { $ref: "#/components/responses/DeadlineProblem" } /api/v1/workspaces/{ws}/status: parameters: - $ref: "#/components/parameters/WorkspaceID" get: operationId: getWorkspaceStatus summary: Read the active and previous deployment state tags: [Workspace] security: - {} - localSessionCookie: [] x-anas-permission: workspace.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} responses: "200": description: The current workspace status. A new workspace returns a null active deployment. content: application/json: schema: $ref: "#/components/schemas/WorkspaceStatusResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "500": $ref: "#/components/responses/InternalProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/deployments: parameters: - $ref: "#/components/parameters/WorkspaceID" get: operationId: listDeployments summary: List deployment state in reverse chronological order tags: [Deployments] security: - {} - localSessionCookie: [] x-anas-permission: workspace.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} parameters: - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" responses: "200": description: One page of deployment state. content: application/json: schema: $ref: "#/components/schemas/DeploymentListResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "500": $ref: "#/components/responses/InternalProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/deployments/{id}: parameters: - $ref: "#/components/parameters/WorkspaceID" - $ref: "#/components/parameters/DeploymentID" get: operationId: inspectDeployment summary: Inspect a deployment manifest and its state description: | Returns a deliberately safe projection of the deployment artifact. Host paths, hook commands, resource specifications, and secret-store keys are omitted even when they exist in the on-disk manifest. All digests derived from configuration, rendered trees, or other secret-bearing inputs are omitted as well, so the read API cannot act as an offline guessing oracle. tags: [Deployments] security: - {} - localSessionCookie: [] x-anas-permission: workspace.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} responses: "200": description: Safe deployment metadata and state. content: application/json: schema: $ref: "#/components/schemas/DeploymentDetailResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "412": $ref: "#/components/responses/PreconditionProblem" "500": $ref: "#/components/responses/InternalProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/modules/{module}/commands: parameters: - $ref: "#/components/parameters/WorkspaceID" - $ref: "#/components/parameters/ModuleName" get: operationId: listModuleCommands summary: List commands frozen for one Module in the active deployment description: Returns only public descriptors and local availability; it does not contact the managed service. tags: [Modules] parameters: - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" security: - {} - localSessionCookie: [] x-anas-permission: workspace.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} responses: "200": description: Public Module Command descriptors in stable command-ID order. content: application/json: schema: $ref: "#/components/schemas/ModuleCommandListResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "412": $ref: "#/components/responses/PreconditionProblem" "500": $ref: "#/components/responses/InternalProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/modules/{module}/commands/{command}: parameters: - $ref: "#/components/parameters/WorkspaceID" - $ref: "#/components/parameters/ModuleName" - $ref: "#/components/parameters/ModuleCommandID" get: operationId: getModuleCommand summary: Read one command frozen for a Module in the active deployment tags: [Modules] security: - {} - localSessionCookie: [] x-anas-permission: workspace.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: m0: {authentication: none, transports: [plaintext, tls]} full: {authentication: owner, transports: [tls]} responses: "200": description: One public Module Command descriptor and its local availability. content: application/json: schema: $ref: "#/components/schemas/ModuleCommandDetailResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/GetMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "412": $ref: "#/components/responses/PreconditionProblem" "500": $ref: "#/components/responses/InternalProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/modules/{module}/commands/{command}/actions/invoke: parameters: - $ref: "#/components/parameters/WorkspaceID" - $ref: "#/components/parameters/ModuleName" - $ref: "#/components/parameters/ModuleCommandID" post: operationId: invokeModuleCommand summary: Enqueue a durable job that runs one Module command description: | The invocation is bound to `command_digest`, the digest the command endpoints return for the descriptor frozen by the active deployment. A digest that no longer matches returns `412`, so a redeploy or Module upgrade between reading and invoking cannot silently run a different command. Commands whose descriptor declares `risk: destructive` require a single-use `step_up_proof` bound to this action, workspace, target, deployment and digest; other commands reject a proof rather than consuming one they do not need. Resolution, parameter validation, and runtime locking happen in the shared application service, so the console never gains a capability the CLI does not have. tags: [Modules] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: module_command.invoke x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ModuleCommandInvokeRequest" responses: "202": description: The Module command job was durably queued, or an identical existing job was returned. headers: Location: description: Relative URL of the durable job resource. required: true schema: type: string pattern: "^/api/v1/jobs/[^/]+$" content: application/json: schema: $ref: "#/components/schemas/DeploymentApplyResponse" "400": $ref: "#/components/responses/BadRequestProblem" "401": $ref: "#/components/responses/UnauthorizedProblem" "403": $ref: "#/components/responses/ForbiddenProblem" "404": $ref: "#/components/responses/NotFoundProblem" "405": $ref: "#/components/responses/PostMethodNotAllowedProblem" "408": $ref: "#/components/responses/RequestCanceledProblem" "409": $ref: "#/components/responses/ConflictProblem" "412": $ref: "#/components/responses/PreconditionProblem" "413": $ref: "#/components/responses/PayloadTooLargeProblem" "415": $ref: "#/components/responses/UnsupportedMediaTypeProblem" "428": $ref: "#/components/responses/PreconditionRequiredProblem" "429": $ref: "#/components/responses/TooManyRequestsProblem" "500": $ref: "#/components/responses/InternalProblem" "503": $ref: "#/components/responses/ServiceUnavailableProblem" "504": $ref: "#/components/responses/DeadlineProblem" /api/v1/workspaces/{ws}/backup-plans: parameters: - $ref: "#/components/parameters/WorkspaceID" post: operationId: planBackup summary: Probe capabilities and calculate a backup plan without executing it tags: [Maintenance] parameters: - $ref: "#/components/parameters/Origin" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: backup.plan x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BackupPlanRequest" responses: "200": description: Current capabilities and a non-executing plan bound to plan_id. content: application/json: schema: $ref: "#/components/schemas/BackupPlanResponse" "400": { $ref: "#/components/responses/BadRequestProblem" } "401": { $ref: "#/components/responses/UnauthorizedProblem" } "403": { $ref: "#/components/responses/ForbiddenProblem" } "404": { $ref: "#/components/responses/NotFoundProblem" } "405": { $ref: "#/components/responses/PostMethodNotAllowedProblem" } "408": { $ref: "#/components/responses/RequestCanceledProblem" } "412": { $ref: "#/components/responses/PreconditionProblem" } "413": { $ref: "#/components/responses/PayloadTooLargeProblem" } "415": { $ref: "#/components/responses/UnsupportedMediaTypeProblem" } "500": { $ref: "#/components/responses/InternalProblem" } "503": { $ref: "#/components/responses/ServiceUnavailableProblem" } "504": { $ref: "#/components/responses/DeadlineProblem" } /api/v1/workspaces/{ws}/backups: parameters: - $ref: "#/components/parameters/WorkspaceID" get: operationId: listBackups summary: List backups under one registered target tags: [Maintenance] parameters: - $ref: "#/components/parameters/BackupTargetIDQuery" - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" security: - localSessionCookie: [] - proxySessionCookie: [] x-anas-permission: backup.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} responses: "200": description: Backups from the selected registered target. content: application/json: schema: $ref: "#/components/schemas/BackupListResponse" "400": { $ref: "#/components/responses/BadRequestProblem" } "401": { $ref: "#/components/responses/UnauthorizedProblem" } "403": { $ref: "#/components/responses/ForbiddenProblem" } "404": { $ref: "#/components/responses/NotFoundProblem" } "405": { $ref: "#/components/responses/GetMethodNotAllowedProblem" } "408": { $ref: "#/components/responses/RequestCanceledProblem" } "412": { $ref: "#/components/responses/PreconditionProblem" } "500": { $ref: "#/components/responses/InternalProblem" } "503": { $ref: "#/components/responses/ServiceUnavailableProblem" } "504": { $ref: "#/components/responses/DeadlineProblem" } /api/v1/workspaces/{ws}/local-admins: parameters: - $ref: "#/components/parameters/WorkspaceID" get: operationId: listLocalAdministrators summary: List local Module administrator identities without credentials tags: [Maintenance] parameters: - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" security: - localSessionCookie: [] - proxySessionCookie: [] x-anas-permission: local_admin.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} responses: "200": description: Public local-administrator records; password is not part of this schema. content: application/json: schema: $ref: "#/components/schemas/LocalAdminListResponse" "400": { $ref: "#/components/responses/BadRequestProblem" } "401": { $ref: "#/components/responses/UnauthorizedProblem" } "403": { $ref: "#/components/responses/ForbiddenProblem" } "404": { $ref: "#/components/responses/NotFoundProblem" } "405": { $ref: "#/components/responses/GetMethodNotAllowedProblem" } "408": { $ref: "#/components/responses/RequestCanceledProblem" } "412": { $ref: "#/components/responses/PreconditionProblem" } "500": { $ref: "#/components/responses/InternalProblem" } "503": { $ref: "#/components/responses/ServiceUnavailableProblem" } "504": { $ref: "#/components/responses/DeadlineProblem" } /api/v1/workspaces/{ws}/local-admins/{module}/{account}/actions/rotate: parameters: - $ref: "#/components/parameters/WorkspaceID" - $ref: "#/components/parameters/ModuleName" - $ref: "#/components/parameters/LocalAdminAccount" post: operationId: rotateLocalAdministrator summary: Queue random local-administrator credential rotation description: The body is empty; caller-selected passwords are never accepted. tags: [Maintenance] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: local_admin.rotate x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/EmptyObject" responses: "202": { $ref: "#/components/responses/AcceptedJob" } "400": { $ref: "#/components/responses/BadRequestProblem" } "401": { $ref: "#/components/responses/UnauthorizedProblem" } "403": { $ref: "#/components/responses/ForbiddenProblem" } "404": { $ref: "#/components/responses/NotFoundProblem" } "405": { $ref: "#/components/responses/PostMethodNotAllowedProblem" } "408": { $ref: "#/components/responses/RequestCanceledProblem" } "409": { $ref: "#/components/responses/ConflictProblem" } "413": { $ref: "#/components/responses/PayloadTooLargeProblem" } "415": { $ref: "#/components/responses/UnsupportedMediaTypeProblem" } "429": { $ref: "#/components/responses/TooManyRequestsProblem" } "500": { $ref: "#/components/responses/InternalProblem" } "503": { $ref: "#/components/responses/ServiceUnavailableProblem" } "504": { $ref: "#/components/responses/DeadlineProblem" } /api/v1/workspaces/{ws}/local-admins/{module}/{account}/reveal: parameters: - $ref: "#/components/parameters/WorkspaceID" - $ref: "#/components/parameters/ModuleName" - $ref: "#/components/parameters/LocalAdminAccount" post: operationId: revealLocalAdministrator summary: Reveal one credential after consuming a state-bound step-up proof tags: [Maintenance] parameters: - $ref: "#/components/parameters/Origin" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: local_admin.reveal x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LocalAdminRevealRequest" responses: "200": description: One short-lived representation containing the credential. headers: Cache-Control: $ref: "#/components/headers/CacheControlNoStore" content: application/json: schema: $ref: "#/components/schemas/LocalAdminRevealResponse" "400": { $ref: "#/components/responses/BadRequestProblem" } "401": { $ref: "#/components/responses/UnauthorizedProblem" } "403": { $ref: "#/components/responses/ForbiddenProblem" } "404": { $ref: "#/components/responses/NotFoundProblem" } "405": { $ref: "#/components/responses/PostMethodNotAllowedProblem" } "408": { $ref: "#/components/responses/RequestCanceledProblem" } "409": { $ref: "#/components/responses/ConflictProblem" } "412": { $ref: "#/components/responses/PreconditionProblem" } "413": { $ref: "#/components/responses/PayloadTooLargeProblem" } "415": { $ref: "#/components/responses/UnsupportedMediaTypeProblem" } "428": { $ref: "#/components/responses/PreconditionRequiredProblem" } "500": { $ref: "#/components/responses/InternalProblem" } "503": { $ref: "#/components/responses/ServiceUnavailableProblem" } "504": { $ref: "#/components/responses/DeadlineProblem" } /api/v1/workspaces/{ws}/terminal-action-previews: parameters: - $ref: "#/components/parameters/WorkspaceID" post: operationId: previewTerminalAction summary: Generate an exact descriptor for one terminal-only operation without executing it tags: [Maintenance] parameters: - $ref: "#/components/parameters/Origin" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: terminal_action.preview x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TerminalActionRequest" responses: "200": description: Exact server-generated argv, display, impact and CLI contract; no action was executed. content: application/json: schema: $ref: "#/components/schemas/TerminalActionPreviewResponse" "400": { $ref: "#/components/responses/BadRequestProblem" } "401": { $ref: "#/components/responses/UnauthorizedProblem" } "403": { $ref: "#/components/responses/ForbiddenProblem" } "404": { $ref: "#/components/responses/NotFoundProblem" } "405": { $ref: "#/components/responses/PostMethodNotAllowedProblem" } "408": { $ref: "#/components/responses/RequestCanceledProblem" } "412": { $ref: "#/components/responses/PreconditionProblem" } "413": { $ref: "#/components/responses/PayloadTooLargeProblem" } "415": { $ref: "#/components/responses/UnsupportedMediaTypeProblem" } "500": { $ref: "#/components/responses/InternalProblem" } "503": { $ref: "#/components/responses/ServiceUnavailableProblem" } "504": { $ref: "#/components/responses/DeadlineProblem" } /api/v1/workspaces/{ws}/snapshots: parameters: - $ref: "#/components/parameters/WorkspaceID" get: operationId: listSnapshots summary: List snapshots and their current health tags: [Maintenance] parameters: - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Cursor" security: - localSessionCookie: [] - proxySessionCookie: [] x-anas-permission: snapshot.read x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} responses: "200": description: Snapshot metadata, health and user-data capture state. content: application/json: schema: $ref: "#/components/schemas/SnapshotListResponse" "400": { $ref: "#/components/responses/BadRequestProblem" } "401": { $ref: "#/components/responses/UnauthorizedProblem" } "403": { $ref: "#/components/responses/ForbiddenProblem" } "404": { $ref: "#/components/responses/NotFoundProblem" } "405": { $ref: "#/components/responses/GetMethodNotAllowedProblem" } "408": { $ref: "#/components/responses/RequestCanceledProblem" } "412": { $ref: "#/components/responses/PreconditionProblem" } "500": { $ref: "#/components/responses/InternalProblem" } "503": { $ref: "#/components/responses/ServiceUnavailableProblem" } "504": { $ref: "#/components/responses/DeadlineProblem" } post: operationId: createSnapshot summary: Queue creation of a snapshot tags: [Maintenance] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: snapshot.change x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SnapshotCreateRequest" responses: "202": { $ref: "#/components/responses/AcceptedJob" } "400": { $ref: "#/components/responses/BadRequestProblem" } "401": { $ref: "#/components/responses/UnauthorizedProblem" } "403": { $ref: "#/components/responses/ForbiddenProblem" } "404": { $ref: "#/components/responses/NotFoundProblem" } "405": { $ref: "#/components/responses/PostMethodNotAllowedProblem" } "408": { $ref: "#/components/responses/RequestCanceledProblem" } "409": { $ref: "#/components/responses/ConflictProblem" } "413": { $ref: "#/components/responses/PayloadTooLargeProblem" } "415": { $ref: "#/components/responses/UnsupportedMediaTypeProblem" } "429": { $ref: "#/components/responses/TooManyRequestsProblem" } "500": { $ref: "#/components/responses/InternalProblem" } "503": { $ref: "#/components/responses/ServiceUnavailableProblem" } "504": { $ref: "#/components/responses/DeadlineProblem" } /api/v1/workspaces/{ws}/snapshots/{id}/actions/{action}: parameters: - $ref: "#/components/parameters/WorkspaceID" - $ref: "#/components/parameters/SnapshotID" - $ref: "#/components/parameters/SnapshotAction" post: operationId: changeSnapshot summary: Queue snapshot pin, unpin or verification tags: [Maintenance] parameters: - $ref: "#/components/parameters/Origin" - $ref: "#/components/parameters/IdempotencyKey" security: - localSessionCookie: [] csrfHeader: [] - proxySessionCookie: [] csrfHeader: [] x-anas-permission: snapshot.change x-anas-scope: workspace x-anas-listeners: [direct, trusted_proxy] x-anas-state-access: full: {authentication: owner, transports: [tls]} requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SnapshotActionRequest" responses: "202": { $ref: "#/components/responses/AcceptedJob" } "400": { $ref: "#/components/responses/BadRequestProblem" } "401": { $ref: "#/components/responses/UnauthorizedProblem" } "403": { $ref: "#/components/responses/ForbiddenProblem" } "404": { $ref: "#/components/responses/NotFoundProblem" } "405": { $ref: "#/components/responses/PostMethodNotAllowedProblem" } "408": { $ref: "#/components/responses/RequestCanceledProblem" } "409": { $ref: "#/components/responses/ConflictProblem" } "413": { $ref: "#/components/responses/PayloadTooLargeProblem" } "415": { $ref: "#/components/responses/UnsupportedMediaTypeProblem" } "429": { $ref: "#/components/responses/TooManyRequestsProblem" } "500": { $ref: "#/components/responses/InternalProblem" } "503": { $ref: "#/components/responses/ServiceUnavailableProblem" } "504": { $ref: "#/components/responses/DeadlineProblem" } components: securitySchemes: serviceBearer: type: http scheme: bearer description: Daemon-issued service identity limited to exact API and resource grants. preAuthCSRFCookie: type: apiKey in: cookie name: anas_preauth_csrf description: | Host-only double-submit cookie issued by `GET /api/v1/auth/csrf`. Its value must exactly match `X-CSRF-Token`. x-anas-cookie-attributes: host_only: true http_only: true same_site: Strict path: / secure: state-dependent csrfHeader: type: apiKey in: header name: X-CSRF-Token description: The matching pre-authentication/session CSRF value; enrollment reads it from the dedicated same-origin CSRF cookie rather than a JSON exchange response. bootstrapSessionCookie: type: apiKey in: cookie name: anas_bootstrap_session description: | Host-only bootstrap session credential issued by token exchange. It is HttpOnly and SameSite=Strict, has Path=/ and no Domain, and is Secure when issued in enrollment. A promoted session authorizes only the enrollment handoff route for its original transaction. x-anas-cookie-attributes: host_only: true http_only: true same_site: Strict path: / secure: state-dependent enrollmentSessionCookie: type: apiKey in: cookie name: __Host-anas_enrollment_session description: | Host-only enrollment credential issued only at the validated TLS target. It is Secure, HttpOnly and SameSite=Strict, has Path=/ and no Domain. x-anas-cookie-attributes: host_only: true http_only: true same_site: Strict path: / secure: always enrollmentCSRFCookie: type: apiKey in: cookie name: __Host-anas_enrollment_csrf description: | Host-only double-submit credential issued only at the validated TLS target. It is Secure and SameSite=Strict, has Path=/ and no Domain, and is intentionally not HttpOnly so the same-origin SPA can copy it into `X-CSRF-Token`. The server also validates its digest as part of the HttpOnly enrollment session. x-anas-cookie-attributes: host_only: true http_only: false same_site: Strict path: / secure: always localSessionCookie: type: apiKey in: cookie name: __Host-anas_local_session description: | Host-only local-owner session credential. It is Secure, HttpOnly and SameSite=Strict, has Path=/ and no Domain. x-anas-cookie-attributes: host_only: true http_only: true same_site: Strict path: / secure: always proxySessionCookie: type: apiKey in: cookie name: __Host-anas_proxy_session description: | Host-only, Secure, HttpOnly and SameSite=Strict session bound to the stable issuer+subject received on the mTLS trusted-proxy listener. x-anas-cookie-attributes: host_only: true http_only: true same_site: Strict path: / secure: always headers: CacheControlNoStore: description: This representation contains administrative state and must not be stored by browsers or intermediaries. schema: type: string const: no-store ManagedConfigETag: description: | Strong opaque 256-bit random generation validator. It is absent from GET only while the workspace has no managed configuration, and is always present after a successful PUT. Weak validators are never emitted, and the internal config.yml content digest is never exposed. schema: type: string pattern: '^"cfgv-[0-9a-f]{64}"$' parameters: Origin: name: Origin in: header required: true description: Exactly one canonical origin equal to the current request scheme and Host. schema: type: string format: uri WorkspaceID: name: ws in: path required: true description: Opaque ID of a workspace registered when the daemon started; never a filesystem path. schema: type: string minLength: 1 maxLength: 64 pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$" DeploymentID: name: id in: path required: true description: Deployment artifact ID, not a path. schema: type: string minLength: 1 maxLength: 255 ModuleName: name: module in: path required: true description: Module name in the active deployment. schema: type: string pattern: "^[a-z][a-z0-9_]*$" SnapshotID: name: id in: path required: true description: Snapshot ID selected from the workspace snapshot list, never a path. schema: type: string minLength: 1 maxLength: 255 pattern: "^[A-Za-z0-9._-]+$" SnapshotAction: name: action in: path required: true schema: type: string enum: [pin, unpin, verify] LocalAdminAccount: name: account in: path required: true description: Stable local-administrator record ID, never a username or password. schema: type: string minLength: 1 maxLength: 64 pattern: "^[A-Za-z0-9._-]+$" BackupTargetIDQuery: name: target_id in: query required: true description: ID of a backup target configured in the root-owned daemon service configuration. schema: $ref: "#/components/schemas/BackupTargetID" ModuleCommandID: name: command in: path required: true description: Stable Module-local command ID. schema: type: string minLength: 1 maxLength: 63 pattern: "^[a-z][a-z0-9-]{0,62}$" JobID: name: id in: path required: true description: Opaque durable job ID, never a workspace path or command argument. schema: type: string minLength: 1 maxLength: 256 LastEventID: name: Last-Event-ID in: header required: false description: Durable decimal event ID after which replay resumes. schema: type: string pattern: "^(0|[1-9][0-9]{0,19})$" maxLength: 20 Limit: name: limit in: query required: false description: Maximum number of list items to return. schema: type: integer format: int32 minimum: 1 maximum: 100 default: 50 Cursor: name: cursor in: query required: false description: Opaque cursor returned as `next_cursor` by the preceding page. schema: type: string minLength: 1 maxLength: 512 IdempotencyKey: name: Idempotency-Key in: header required: true description: Opaque caller-selected key scoped to principal, method, canonical path, and workspace. schema: type: string minLength: 1 maxLength: 256 pattern: "^[!-~]+$" OptionalIdempotencyKey: name: Idempotency-Key in: header required: false description: Required when a confirmed preview is submitted for job creation; omit for preview-only requests. schema: type: string minLength: 1 maxLength: 256 pattern: "^[!-~]+$" ConfigIfMatch: name: If-Match in: header required: false description: | Required only when replacing an existing managed configuration. Supply exactly one strong ETag returned by GET. Lists, weak tags, and `*` are rejected; do not send this header together with If-None-Match. schema: type: string pattern: '^"cfgv-[0-9a-f]{64}"$' ConfigIfNoneMatch: name: If-None-Match in: header required: false description: | Required only for the first managed configuration and must be exactly `*`. Do not send this header together with If-Match. schema: type: string const: "*" ModuleConfigIfMatch: name: If-Match in: header required: true description: Exactly one strong managed-configuration ETag returned by the Module list; weak tags, lists, and `*` are rejected. schema: type: string pattern: '^"cfgv-[0-9a-f]{64}"$' responses: AcceptedHostActionJob: description: A durable host-action job was accepted. Admission is not completion; read the same job for its terminal outcome. headers: Location: description: The public URL of the accepted job. schema: {type: string} Cache-Control: $ref: "#/components/headers/CacheControlNoStore" content: application/json: schema: $ref: "#/components/schemas/JobDetailResponse" AcceptedJob: description: The job was durably queued, or an identical existing job was returned. headers: Location: required: true description: Relative URL of the durable job resource. schema: type: string pattern: "^/api/v1/jobs/[^/]+$" content: application/json: schema: $ref: "#/components/schemas/DeploymentApplyResponse" BadRequestProblem: description: The Host or Origin is invalid, a path or body value is invalid, or the query string is malformed or unsupported. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" UnauthorizedProblem: description: The credential is missing, expired, invalid, or otherwise unauthenticated. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" ForbiddenProblem: description: Origin, CSRF, or authorization validation failed. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" NotFoundProblem: description: The resource does not exist, or the route is hidden for the current state, listener, or transport. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" ConflictProblem: description: The validated enrollment certificate or another required state transition prerequisite is not ready. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" PreconditionProblem: description: A supplied entity validator is not strong and current, or persisted state fails its required integrity precondition. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" PreconditionRequiredProblem: description: The condition header required for the current managed-config lifecycle state is missing or the wrong header family was used. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" GetMethodNotAllowedProblem: description: The route only accepts GET in the current state and transport. headers: Allow: required: true schema: type: string const: GET content: application/problem+json: schema: $ref: "#/components/schemas/Problem" PostMethodNotAllowedProblem: description: The route only accepts POST in the current state and transport. headers: Allow: required: true schema: type: string const: POST content: application/problem+json: schema: $ref: "#/components/schemas/Problem" ConfigMethodNotAllowedProblem: description: The configuration resource only accepts GET or PUT in the current state and transport. headers: Allow: required: true schema: type: string const: GET, PUT content: application/problem+json: schema: $ref: "#/components/schemas/Problem" PayloadTooLargeProblem: description: The request body exceeds the route-specific bounded input limit. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" UnsupportedMediaTypeProblem: description: The request Content-Type is not application/json. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" UnsupportedFormMediaTypeProblem: description: The request Content-Type is not application/x-www-form-urlencoded. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" NotAcceptableProblem: description: The requested representation does not allow text/event-stream. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" EventGapProblem: description: Last-Event-ID refers to events no longer retained for this job. content: application/problem+json: schema: $ref: "#/components/schemas/EventGapProblem" TooManyRequestsProblem: description: An authentication rate limit or the global SSE connection limit was reached. headers: Retry-After: required: true description: Seconds until another attempt should be made. schema: type: integer minimum: 1 content: application/problem+json: schema: $ref: "#/components/schemas/Problem" RequestCanceledProblem: description: Request processing was canceled. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" InternalProblem: description: The daemon could not read state, authorize, map, or encode the response. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" ServiceUnavailableProblem: description: Authentication state, persistence, or auditing is unavailable. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" ConfigPutServiceUnavailableProblem: description: | Configuration persistence or auditing is unavailable. A problem whose `code` is `config_recovery_required` has an indeterminate commit result: the redo WAL may already be durable and a later supported reader may finish rolling it forward. The client must GET the configuration and inspect its current ETag/state before deciding whether to retry. Other 503 codes describe a write that was not published. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" DeadlineProblem: description: The request deadline expired before the query completed. content: application/problem+json: schema: $ref: "#/components/schemas/Problem" schemas: IncusHostRequest: type: object additionalProperties: false properties: skip: type: boolean description: Omission means false. Only accepted for the install plan/action; it never authorizes configure, enroll or uninstall effects. interface: type: string enum: [incus_container, incus_vm] description: Omission selects incus_container. VM selection is explicit and never silently downgraded. storage_size_gib: type: integer minimum: 16 maximum: 4096 description: Omission selects 64 GiB. chinese_speedup: type: boolean description: Frozen mainland distribution-package mirror choice. Install plans resolve it from the managed workspace CHINESE_SPEEDUP setting; apply must preserve the returned value. Incus packages retain the fixed Zabbly source. port_range_first: type: integer minimum: 1024 maximum: 65535 description: First host port the operator approves for compute port bindings. Omitting both port range fields selects 30000-32767; the plan returns the explicit range and apply must preserve it. port_range_last: type: integer minimum: 1024 maximum: 65535 description: Last host port of the approved range, inclusive and not below port_range_first. IncusHostApplyParameters: type: object additionalProperties: false required: [schema, request, binding] properties: schema: type: string const: anas.host-action.incus/v1 request: $ref: "#/components/schemas/IncusHostRequest" binding: type: object additionalProperties: false required: [schema, plan_digest, phase, destructive] properties: schema: type: string const: anas.incus-host-provision/v1 plan_digest: type: string pattern: "^[0-9a-f]{64}$" phase: type: string enum: [install, configure, enroll, uninstall] destructive: type: boolean const: true APIVersion: type: string const: anas.dev/api/v1 NextCursor: type: [string, "null"] minLength: 1 maxLength: 512 EmptyObject: type: object additionalProperties: false BackupTargetID: type: string minLength: 1 maxLength: 64 pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$" description: Opaque root-configured backup destination ID, never a host path. MaintenanceSnapshotID: type: string minLength: 1 maxLength: 255 pattern: "^[A-Za-z0-9._-]+$" BackupID: type: string minLength: 1 maxLength: 255 pattern: "^[A-Za-z0-9._-]+$" BackupPlanID: type: string pattern: "^bkp_[0-9a-f]{64}$" SnapshotCreateRequest: type: object additionalProperties: false required: [include_userdata] properties: label: type: string maxLength: 255 include_userdata: type: boolean description: Explicit opt-in; user data is not captured when false. SnapshotActionRequest: type: object additionalProperties: false properties: label: type: string maxLength: 255 description: Used only by pin and unpin; verify requires an empty object. SnapshotListResponse: type: object additionalProperties: false required: [api_version, workspace_id, keep_auto, snapshots, next_cursor] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string keep_auto: type: integer minimum: 0 snapshots: type: array items: $ref: "#/components/schemas/SnapshotRecord" next_cursor: $ref: "#/components/schemas/NextCursor" SnapshotRecord: type: object additionalProperties: false required: [id, kind, pinned, created_at, reason, label, deployment_id, complete, config_matches_current, size_bytes, modules, healthy, includes_userdata] properties: id: $ref: "#/components/schemas/MaintenanceSnapshotID" kind: type: string pinned: type: boolean created_at: type: string reason: type: string label: type: string deployment_id: type: string complete: type: boolean config_matches_current: type: boolean size_bytes: type: [integer, "null"] format: int64 minimum: 0 modules: type: object additionalProperties: type: string healthy: type: boolean includes_userdata: type: boolean BackupPlanRequest: type: object additionalProperties: false required: [target_id, no_stop, skip_userdata] properties: target_id: $ref: "#/components/schemas/BackupTargetID" mode: type: string enum: [snapshot, send, send-file, copy] snapshot_id: $ref: "#/components/schemas/MaintenanceSnapshotID" parent_backup_id: $ref: "#/components/schemas/BackupID" no_stop: type: boolean skip_userdata: type: boolean description: Explicitly omit user data; false preserves the default inclusion. BackupPlanResponse: type: object additionalProperties: false required: [api_version, workspace_id, target_id, plan_id, capabilities, plan] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string target_id: $ref: "#/components/schemas/BackupTargetID" plan_id: $ref: "#/components/schemas/BackupPlanID" capabilities: $ref: "#/components/schemas/BackupCapabilities" plan: $ref: "#/components/schemas/BackupPlan" BackupCapabilities: type: object additionalProperties: false required: [source, target, tools, privileged, estimate, modes, recommended] properties: source: $ref: "#/components/schemas/BackupSource" target: $ref: "#/components/schemas/BackupTarget" tools: type: object additionalProperties: type: boolean privileged: type: boolean estimate: $ref: "#/components/schemas/BackupEstimate" modes: type: array items: $ref: "#/components/schemas/BackupMode" recommended: type: string BackupSource: type: object additionalProperties: false required: [fs_type, data_is_subvolume, data_is_mountpoint, data_fully_readable] properties: fs_type: { type: string } data_is_subvolume: { type: boolean } data_is_mountpoint: { type: boolean } data_fully_readable: { type: boolean } BackupTarget: type: object additionalProperties: false required: [id, exists, writable, fs_type, free_bytes] properties: id: $ref: "#/components/schemas/BackupTargetID" exists: { type: boolean } writable: { type: boolean } fs_type: { type: string } free_bytes: type: [integer, "null"] format: int64 minimum: 0 BackupEstimate: type: object additionalProperties: false required: [data_bytes, userdata_bytes, state_bytes, active_deployment_bytes, total_bytes] properties: data_bytes: { type: integer, format: int64, minimum: 0 } userdata_bytes: { type: integer, format: int64, minimum: 0 } state_bytes: { type: integer, format: int64, minimum: 0 } active_deployment_bytes: { type: integer, format: int64, minimum: 0 } total_bytes: { type: integer, format: int64, minimum: 0 } BackupMode: type: object additionalProperties: false required: [id, available, incremental, parents, notes] properties: id: { type: string } available: { type: boolean } reason: { type: string } incremental: { type: boolean } parents: type: array items: { type: string } notes: type: array items: { type: string } BackupPlan: type: object additionalProperties: false required: [mode, incremental, transfer_bytes, dest_free_after_bytes, includes, excludes, stop_containers, containers_to_stop, estimated_downtime_seconds, warnings, actions] properties: mode: { type: string } incremental: { type: boolean } parent: { type: string } transfer_bytes: { type: integer, format: int64, minimum: 0 } dest_free_after_bytes: type: [integer, "null"] format: int64 includes: type: array items: { type: string } excludes: type: array items: { type: string } stop_containers: { type: boolean } containers_to_stop: type: array items: { type: string } estimated_downtime_seconds: { type: integer, minimum: 0 } warnings: type: array items: $ref: "#/components/schemas/BackupWarning" actions: type: array items: $ref: "#/components/schemas/BackupAction" BackupWarning: type: object additionalProperties: false required: [code] properties: code: { type: string } BackupAction: type: object additionalProperties: false required: [step, op] properties: step: { type: integer, minimum: 1 } op: { type: string } target: type: string description: Omitted by the HTTP projection when the CLI value is a host path. count: { type: integer, minimum: 0 } BackupListResponse: type: object additionalProperties: false required: [api_version, workspace_id, target_id, backups, next_cursor] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: { type: string } target_id: $ref: "#/components/schemas/BackupTargetID" backups: type: array items: $ref: "#/components/schemas/BackupRecord" next_cursor: $ref: "#/components/schemas/NextCursor" BackupRecord: type: object additionalProperties: false required: [id, mode, created_at, incremental, size_bytes, deployment_id, modules, complete, chain_broken, includes_userdata] properties: id: $ref: "#/components/schemas/BackupID" mode: { type: string } created_at: { type: string } source_snapshot: { type: string } incremental: { type: boolean } parent: { type: string } size_bytes: { type: integer, format: int64, minimum: 0 } deployment_id: { type: string } modules: type: object additionalProperties: { type: string } complete: { type: boolean } chain_broken: { type: boolean } includes_userdata: { type: boolean } LocalAdminListResponse: type: object additionalProperties: false required: [api_version, workspace_id, accounts, next_cursor] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: { type: string } accounts: type: array items: $ref: "#/components/schemas/LocalAdminRecord" next_cursor: $ref: "#/components/schemas/NextCursor" LocalAdminRecord: type: object additionalProperties: false required: [target_id, module, account, purpose, username, url] properties: target_id: type: string pattern: "^lad_[0-9a-f]{64}$" description: Opaque server-generated target bound into credential-reveal step-up proofs. module: { type: string } account: { type: string } purpose: { type: string } username: { type: string } url: { type: string } LocalAdminRevealRequest: type: object additionalProperties: false required: [step_up_proof] properties: step_up_proof: type: string pattern: "^sup_[A-Za-z0-9_-]{43}$" writeOnly: true LocalAdminRevealResponse: type: object additionalProperties: false required: [api_version, workspace_id, module, account, purpose, username, url, password] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: { type: string } module: { type: string } account: { type: string } purpose: { type: string } username: { type: string } url: { type: string } password: type: string minLength: 1 description: Sensitive one-time display value; the response is always marked Cache-Control no-store. TerminalActionRequest: oneOf: - $ref: "#/components/schemas/TerminalSnapshotRestoreRequest" - $ref: "#/components/schemas/TerminalSnapshotDeleteRequest" - $ref: "#/components/schemas/TerminalBackupCreateRequest" - $ref: "#/components/schemas/TerminalBackupRestoreRequest" - $ref: "#/components/schemas/TerminalBackupVerifyRequest" TerminalSnapshotRestoreRequest: type: object additionalProperties: false required: [operation, snapshot] properties: operation: { const: snapshot.restore } snapshot: $ref: "#/components/schemas/TerminalSnapshotRestoreTarget" TerminalSnapshotDeleteRequest: type: object additionalProperties: false required: [operation, snapshot] properties: operation: { const: snapshot.delete } snapshot: $ref: "#/components/schemas/TerminalSnapshotDeleteTarget" TerminalSnapshotRestoreTarget: type: object additionalProperties: false required: [id, restore_userdata] properties: id: $ref: "#/components/schemas/MaintenanceSnapshotID" restore_userdata: { type: boolean } TerminalSnapshotDeleteTarget: type: object additionalProperties: false required: [id, force] properties: id: $ref: "#/components/schemas/MaintenanceSnapshotID" force: { type: boolean } TerminalBackupCreateRequest: type: object additionalProperties: false required: [operation, backup] properties: operation: { const: backup.create } backup: $ref: "#/components/schemas/TerminalBackupCreateTarget" TerminalBackupRestoreRequest: type: object additionalProperties: false required: [operation, backup] properties: operation: { const: backup.restore } backup: $ref: "#/components/schemas/TerminalBackupExistingTarget" TerminalBackupVerifyRequest: type: object additionalProperties: false required: [operation, backup] properties: operation: { const: backup.verify } backup: $ref: "#/components/schemas/TerminalBackupExistingTarget" TerminalBackupCreateTarget: type: object additionalProperties: false required: [target_id, plan_id, mode, no_stop, skip_userdata] properties: target_id: $ref: "#/components/schemas/BackupTargetID" plan_id: $ref: "#/components/schemas/BackupPlanID" mode: type: string enum: [snapshot, send, send-file, copy] snapshot_id: $ref: "#/components/schemas/MaintenanceSnapshotID" parent_backup_id: $ref: "#/components/schemas/BackupID" no_stop: { type: boolean } skip_userdata: type: boolean description: Explicitly omit user data; false preserves backup create's default inclusion. TerminalBackupExistingTarget: type: object additionalProperties: false required: [target_id, backup_id] properties: target_id: $ref: "#/components/schemas/BackupTargetID" backup_id: $ref: "#/components/schemas/BackupID" TerminalActionPreviewResponse: type: object additionalProperties: false required: [api_version, workspace_id, operation, target, impact, argv, display, cli_contract] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: { type: string } operation: type: string enum: [snapshot.restore, snapshot.delete, backup.create, backup.restore, backup.verify] target: $ref: "#/components/schemas/TerminalActionTarget" impact: $ref: "#/components/schemas/TerminalActionImpact" argv: type: array minItems: 1 items: { type: string } display: type: string minLength: 1 description: POSIX-shell-safe display that losslessly round-trips to argv. cli_contract: type: string minLength: 1 TerminalActionTarget: type: object additionalProperties: false properties: snapshot_id: $ref: "#/components/schemas/MaintenanceSnapshotID" backup_target_id: $ref: "#/components/schemas/BackupTargetID" backup_plan_id: $ref: "#/components/schemas/BackupPlanID" backup_id: $ref: "#/components/schemas/BackupID" TerminalActionImpact: type: object additionalProperties: false required: [data, userdata, reversible] properties: data: { type: boolean } userdata: { type: boolean } reversible: { type: boolean } DeploymentPlanRequest: type: object additionalProperties: false properties: step_up_proof: type: string pattern: "^sup_[A-Za-z0-9_-]{43}$" writeOnly: true description: Required in full state and forbidden during bootstrap. deployment_id: type: string maxLength: 255 description: Optional existing ready deployment target bound into the full-state step-up proof. PlanDigest: type: string description: Stable SHA-256 digest of the complete typed plan and opaque config validator. pattern: "^[0-9a-f]{64}$" DeploymentPlanResponse: type: object additionalProperties: false required: [api_version, workspace_id, job, plan, confirmation] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string minLength: 1 job: $ref: "#/components/schemas/JobSummary" plan: $ref: "#/components/schemas/DeploymentPlan" confirmation: $ref: "#/components/schemas/DeploymentConfirmation" DeploymentPlan: type: object additionalProperties: false required: - config_validator - digest - modules - iam - module_plans - capability_bindings - dns_platforms - dns_credential_compatibility - dynamic_dns - module_lifecycles properties: config_validator: $ref: "#/components/schemas/ConfigValidator" digest: $ref: "#/components/schemas/PlanDigest" modules: type: array items: type: string iam: $ref: "#/components/schemas/DeploymentPlanIAM" module_plans: $ref: "#/components/schemas/NestedStringMap" capability_bindings: $ref: "#/components/schemas/NestedStringMap" dns_platforms: $ref: "#/components/schemas/StringMap" dns_credential_compatibility: type: array items: $ref: "#/components/schemas/DeploymentDNSCredentialCompatibility" dynamic_dns: $ref: "#/components/schemas/DeploymentDynamicDNS" module_lifecycles: type: array items: $ref: "#/components/schemas/DeploymentModuleLifecycle" temp_switch: $ref: "#/components/schemas/TempSwitchPlan" TempSwitchPlan: type: object additionalProperties: false required: [required, stop_modules, start_modules, session_interruption] properties: required: type: boolean stop_modules: type: array items: {type: string} description: All modules in reverse dependency order. start_modules: type: array items: {type: string} description: All target modules in dependency order. session_interruption: type: boolean description: Existing application sessions are interrupted by the full workspace restart. DeploymentPlanIAM: type: object additionalProperties: false required: [provider, consumers] properties: provider: type: [string, "null"] consumers: type: array items: $ref: "#/components/schemas/DeploymentPlanIAMConsumer" DeploymentPlanIAMConsumer: type: object additionalProperties: false required: [module, interface] properties: module: type: string interface: type: string DeploymentDNSCredentialCompatibility: type: object additionalProperties: false required: [left, right, platform, compatibility] properties: left: type: string right: type: string platform: type: string compatibility: type: string DeploymentDynamicDNS: type: object additionalProperties: false required: [provider, self_managed, automatic] properties: provider: type: [string, "null"] self_managed: type: array items: type: string automatic: type: boolean DeploymentModuleLifecycle: type: object additionalProperties: false required: [module, status] properties: module: type: string status: type: string StringMap: type: object additionalProperties: type: string NestedStringMap: type: object additionalProperties: $ref: "#/components/schemas/StringMap" DeploymentConfirmation: type: object additionalProperties: false required: [token, expires_at, action, plan_job_id, config_validator, plan_digest] properties: token: type: string pattern: "^cnf_[0-9a-f]{64}$" description: One-use 256-bit proof returned only here and never persisted in plaintext. expires_at: type: string format: date-time action: type: string const: deployment.apply plan_job_id: type: string minLength: 1 maxLength: 256 config_validator: $ref: "#/components/schemas/ConfigValidator" plan_digest: $ref: "#/components/schemas/PlanDigest" DeploymentApplyRequest: type: object additionalProperties: false required: - plan_job_id - confirmation_token - expected_config_validator - expected_plan_digest - allow_risky properties: plan_job_id: type: string minLength: 1 maxLength: 256 confirmation_token: type: string pattern: "^cnf_[0-9a-f]{64}$" writeOnly: true step_up_proof: type: string pattern: "^sup_[A-Za-z0-9_-]{43}$" writeOnly: true description: Required for full-state direct apply and forbidden during bootstrap. expected_config_validator: $ref: "#/components/schemas/ConfigValidator" expected_plan_digest: $ref: "#/components/schemas/PlanDigest" deployment_id: type: string maxLength: 255 build: type: boolean default: false update_lock: type: boolean default: false allow_risky: type: boolean description: Explicit even when false; omission is rejected. snapshot: type: boolean default: false no_snapshot: type: boolean default: false DeploymentApplyResponse: type: object additionalProperties: false required: [api_version, job, existing] properties: api_version: $ref: "#/components/schemas/APIVersion" job: $ref: "#/components/schemas/JobSummary" existing: type: boolean LifecycleActionRequest: type: object additionalProperties: false required: [modules] properties: modules: type: array uniqueItems: true items: type: string minLength: 1 expected_deployment_id: type: string minLength: 1 maxLength: 255 description: Required only when executing a previously returned preview. expected_digest: $ref: "#/components/schemas/PlanDigest" confirmed_modules: type: array uniqueItems: true items: type: string minLength: 1 description: Required only for execution and must exactly equal preview.affected_modules in order. LifecyclePreviewResponse: type: object additionalProperties: false required: [api_version, workspace_id, preview] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string minLength: 1 preview: $ref: "#/components/schemas/LifecyclePreview" LifecyclePreview: type: object additionalProperties: false required: [deployment_id, action, requested_modules, affected_modules, digest] properties: deployment_id: type: string minLength: 1 maxLength: 255 action: type: string enum: [start, stop, restart] requested_modules: type: array items: type: string affected_modules: type: array items: type: string digest: $ref: "#/components/schemas/PlanDigest" RollbackActionRequest: type: object additionalProperties: false required: [deployment_id] properties: deployment_id: type: string minLength: 1 maxLength: 255 expected_active_deployment: type: string minLength: 1 maxLength: 255 description: Required only when executing a previously returned preview. expected_digest: $ref: "#/components/schemas/PlanDigest" allow_risky: type: boolean description: Required only for execution and explicit even when false. confirmed_deployment_id: type: string minLength: 1 maxLength: 255 description: Required only for execution and must equal the preview target. confirmed_guarded_changes: type: array items: type: string description: Required only for execution and must exactly equal preview.guarded_changes in order. RollbackPreviewResponse: type: object additionalProperties: false required: [api_version, workspace_id, preview] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string minLength: 1 preview: $ref: "#/components/schemas/RollbackPreview" RollbackPreview: type: object additionalProperties: false required: [active_deployment, target_deployment, guarded_changes, data_touched, digest] properties: active_deployment: type: string minLength: 1 maxLength: 255 target_deployment: type: string minLength: 1 maxLength: 255 guarded_changes: type: array items: type: string data_touched: type: boolean const: false temp_switch: $ref: "#/components/schemas/TempSwitchPlan" digest: $ref: "#/components/schemas/PlanDigest" ControlPlaneState: type: string enum: [bootstrap, enrollment, full] ConsoleRuntimeState: type: string enum: [m0, bootstrap, enrollment, full] description: Public capability state used by the console shell to select the safe entry flow. BootstrapExchangeRequest: type: object additionalProperties: false required: [token] properties: token: type: string minLength: 1 writeOnly: true description: The one-use bootstrap token printed by the local CLI. EnrollmentHandoffExchangeRequest: type: object additionalProperties: false required: [handoff] properties: handoff: type: string minLength: 1 writeOnly: true description: The one-use handoff returned at the plaintext source origin. EnrollmentOwnerRequest: type: object additionalProperties: false required: [password] properties: password: type: string minLength: 1 format: password writeOnly: true LocalLoginRequest: type: object additionalProperties: false required: [password] properties: password: type: string minLength: 1 format: password writeOnly: true LocalStepUpRequest: type: object additionalProperties: false required: [action, workspace_id] properties: password: type: string minLength: 1 format: password writeOnly: true description: Required only for the direct local-owner source; forbidden on the trusted-proxy source. action: type: string enum: [deployment.apply, local_admin.reveal] workspace_id: type: string minLength: 1 maxLength: 256 deployment_id: type: string maxLength: 255 description: Optional target for deployment.apply; mutually exclusive with target_id. target_id: type: string minLength: 1 maxLength: 256 pattern: "^lad_[0-9a-f]{64}$" description: Required for local_admin.reveal; opaque server-generated target from the local-administrator list and mutually exclusive with deployment_id. LocalStepUpResponse: type: object additionalProperties: false required: [api_version, proof, expires_at, action, workspace_id] properties: api_version: $ref: "#/components/schemas/APIVersion" proof: type: string pattern: "^sup_[A-Za-z0-9_-]{43}$" description: Returned once; only its SHA-256 digest is persisted. expires_at: type: string format: date-time action: type: string enum: [deployment.apply, local_admin.reveal] workspace_id: type: string minLength: 1 maxLength: 256 deployment_id: type: string maxLength: 255 target_id: type: string minLength: 1 maxLength: 256 CSRFResponse: type: object additionalProperties: false required: [api_version, csrf_token, expires_at] properties: api_version: $ref: "#/components/schemas/APIVersion" csrf_token: type: string minLength: 1 description: Echo this value in X-CSRF-Token; it is also set in the pre-authentication cookie. expires_at: type: string format: date-time BootstrapSessionResponse: type: object additionalProperties: false required: [api_version, csrf_token, expires_at, idle_expires_at, state, transaction_id] properties: api_version: $ref: "#/components/schemas/APIVersion" csrf_token: type: string minLength: 1 description: Session-bound CSRF value; the session token itself is only in the HttpOnly cookie. expires_at: type: string format: date-time idle_expires_at: type: string format: date-time state: $ref: "#/components/schemas/ControlPlaneState" transaction_id: type: string minLength: 1 EnrollmentHandoffResponse: type: object additionalProperties: false required: [api_version, handoff, target_origin, form_action, expires_at] properties: api_version: $ref: "#/components/schemas/APIVersion" handoff: type: string minLength: 1 description: One-use credential displayed only in this response and never persisted in plaintext. target_origin: type: string format: uri pattern: "^https://" form_action: type: string format: uri pattern: "^https://" expires_at: type: string format: date-time EnrollmentOwnerResponse: type: object additionalProperties: false required: [api_version, state] properties: api_version: $ref: "#/components/schemas/APIVersion" state: type: string const: full LocalSessionResponse: type: object additionalProperties: false required: [api_version, csrf_token, expires_at, idle_expires_at, state] properties: api_version: $ref: "#/components/schemas/APIVersion" csrf_token: type: string minLength: 1 description: Session-bound CSRF value; the session token itself is only in the HttpOnly cookie. expires_at: type: string format: date-time idle_expires_at: type: string format: date-time state: type: string const: full SessionRefreshResponse: oneOf: - $ref: "#/components/schemas/BootstrapSessionResponse" - $ref: "#/components/schemas/LocalSessionResponse" HealthResponse: type: object additionalProperties: false required: [status] properties: status: type: string const: ok SystemResponse: type: object additionalProperties: false required: [api_version, build, capabilities, workspace_ids, backup_target_ids, certificate_issuer, console_state, listener, direct_recovery_urls, proxy_url] properties: api_version: $ref: "#/components/schemas/APIVersion" build: $ref: "#/components/schemas/BuildInfo" capabilities: $ref: "#/components/schemas/SystemCapabilities" workspace_ids: type: array items: type: string uniqueItems: true backup_target_ids: type: array description: Root-configured backup destination IDs; host paths are never exposed. items: $ref: "#/components/schemas/BackupTargetID" uniqueItems: true certificate_issuer: type: string enum: [none, temporary, internal, acme] description: Current validated serving-certificate source; `internal` is a supported trusted mode, not an error state. console_state: $ref: "#/components/schemas/ConsoleRuntimeState" listener: type: string enum: [direct, trusted_proxy] description: Physical listener that served this representation; the SPA uses it to avoid publishing local-login UI on the proxy entry. direct_recovery_urls: type: array uniqueItems: true items: type: string format: uri pattern: "^https?://" description: Server-derived direct-listener origins shown as plain recovery references, never as a local-login fallback link on the trusted-proxy origin. proxy_url: type: [string, "null"] format: uri pattern: "^https://" description: Configured Traefik/OIDC public origin, or null when the trusted-proxy listener is disabled. SystemHostActionCapabilities: type: object additionalProperties: false required: [incus_status] properties: incus_status: type: boolean description: True when the authenticated Incus read-only host preflight route is mounted on this listener. incus_provision: type: boolean description: True only when plan, one-use confirmation and apply handlers are all mounted. This is entry availability, not compute readiness or native-host acceptance. incus_image_prune: type: boolean description: True only when the explicit image prune dry-run and confirmed apply handlers are mounted. BuildInfo: type: object additionalProperties: false required: [version, commit, date] properties: version: type: string commit: type: string date: type: string description: Build date supplied by the release process, or `unknown` in a development build. SystemCapabilities: type: object additionalProperties: false required: [read_only] properties: read_only: type: boolean description: False when the configured service exposes a supported mutating application service such as managed configuration writes. host_actions: $ref: "#/components/schemas/SystemHostActionCapabilities" ConfigValidator: type: string description: Opaque 256-bit random managed-config generation validator without ETag quoting. pattern: "^cfgv-[0-9a-f]{64}$" ConfigPublicDocument: type: object description: | JSON-compatible normalized desired state. The server accepts and emits only registered structural and schema-addressed fields. The raw `secrets` mapping and every effective sensitive value are excluded. not: required: [secrets] additionalProperties: true ConfigSensitiveUnchanged: type: object additionalProperties: false required: [operation] properties: operation: type: string const: unchanged ConfigSensitiveUnset: type: object additionalProperties: false required: [operation] properties: operation: type: string const: unset ConfigSensitiveSet: type: object additionalProperties: false required: [operation, value] properties: operation: type: string const: set value: type: string writeOnly: true description: The replacement secret; accepted only in a request and never echoed. ConfigSensitiveMutation: description: Explicit, non-ambiguous operation for one schema-declared sensitive field. oneOf: - $ref: "#/components/schemas/ConfigSensitiveUnchanged" - $ref: "#/components/schemas/ConfigSensitiveSet" - $ref: "#/components/schemas/ConfigSensitiveUnset" ConfigCandidate: type: object additionalProperties: false required: [config] properties: config: $ref: "#/components/schemas/ConfigPublicDocument" sensitive: type: object description: | Map keyed only by schema-declared sensitive field path. Omission of a path is treated as unchanged; supplied values must use exactly one tagged operation. propertyNames: type: string minLength: 1 maxLength: 512 additionalProperties: $ref: "#/components/schemas/ConfigSensitiveMutation" ConfigConstraints: type: object additionalProperties: false properties: minimum: type: integer maximum: type: integer min_length: type: integer minimum: 0 max_length: type: integer minimum: 0 pattern: type: string format: type: string enum: [iana_timezone, language_tag, locale, ipv4, dns_name] ConfigField: type: object additionalProperties: false allOf: - if: required: [sensitive] properties: sensitive: const: true then: required: [sensitive_state] not: required: [default] required: - path - document_path - module - parameter - type - allowed_values - has_default - default_source - input_required - must_resolve - constraints - sensitive - editable - effect properties: path: type: string minLength: 1 document_path: type: array minItems: 1 description: Canonical path of this field inside the public config document. items: type: string minLength: 1 module: type: string minLength: 1 parameter: type: string minLength: 1 type: type: string enum: [unknown, string, bool, int, enum] allowed_values: type: array items: type: string uniqueItems: true default: type: string description: Omitted for sensitive fields and when no public literal default is available. has_default: type: boolean default_source: type: string enum: [none, static, host, runtime, inherited, generated] input_required: type: boolean must_resolve: type: boolean constraints: $ref: "#/components/schemas/ConfigConstraints" sensitive: type: boolean sensitive_state: type: string enum: [set, unset] description: Present only for an effective sensitive field; never contains its value. editable: type: boolean description: False for guarded effects and effective sensitive aliases that cannot be safely round-tripped. edit_command: type: string description: Safe operator guidance, not executable argv supplied by the client. effect: type: string minLength: 1 apply: type: string description: type: string ConfigChange: type: object additionalProperties: false required: [path, change, effect, sensitive, editable] properties: path: type: string minLength: 1 change: type: string enum: [add, change, remove] effect: type: string minLength: 1 apply: type: string sensitive: type: boolean editable: type: boolean ConfigSnapshotResponse: type: object additionalProperties: false required: [api_version, workspace_id, managed, config, available_modules, fields] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string minLength: 1 managed: type: boolean config: $ref: "#/components/schemas/ConfigPublicDocument" available_modules: type: array description: Canonically ordered registry Module names available for selection, including Modules with no configuration fields. items: type: string minLength: 1 uniqueItems: true fields: type: array items: $ref: "#/components/schemas/ConfigField" ConfigValidationResponse: type: object additionalProperties: false required: [api_version, workspace_id, config, changes] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string minLength: 1 base_validator: $ref: "#/components/schemas/ConfigValidator" config: $ref: "#/components/schemas/ConfigPublicDocument" changes: type: array items: $ref: "#/components/schemas/ConfigChange" ConfigPutResponse: type: object additionalProperties: false required: [api_version, workspace_id, validator, config, available_modules, fields, changes] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string minLength: 1 previous_validator: $ref: "#/components/schemas/ConfigValidator" validator: $ref: "#/components/schemas/ConfigValidator" config: $ref: "#/components/schemas/ConfigPublicDocument" available_modules: type: array description: Canonically ordered registry Module names available for selection. items: type: string minLength: 1 uniqueItems: true fields: type: array items: $ref: "#/components/schemas/ConfigField" changes: type: array items: $ref: "#/components/schemas/ConfigChange" AuditEventListResponse: type: object additionalProperties: false required: [api_version, items, next_cursor] properties: api_version: $ref: "#/components/schemas/APIVersion" items: type: array items: $ref: "#/components/schemas/AuditEvent" next_cursor: $ref: "#/components/schemas/NullableString" AuditEvent: type: object additionalProperties: false required: [sequence, timestamp, type] properties: sequence: type: integer format: int64 minimum: 1 timestamp: type: string format: date-time type: type: string minLength: 1 actor: type: string workspace_id: type: string outcome: type: string details: type: object description: Value-safe details after the audit writer's mandatory credential redaction. additionalProperties: true JobListResponse: type: object additionalProperties: false required: [api_version, items, next_cursor] properties: api_version: $ref: "#/components/schemas/APIVersion" items: type: array items: $ref: "#/components/schemas/JobSummary" next_cursor: $ref: "#/components/schemas/NullableString" JobDetailResponse: type: object additionalProperties: false required: [api_version, job] properties: api_version: $ref: "#/components/schemas/APIVersion" job: $ref: "#/components/schemas/JobDetail" JobSummary: type: object additionalProperties: false required: [id, kind, workspace_id, mutating, status, progress, created_at, revision] properties: id: type: string minLength: 1 maxLength: 256 kind: type: string minLength: 1 workspace_id: type: string minLength: 1 mutating: type: boolean status: $ref: "#/components/schemas/JobStatus" progress: type: integer minimum: 0 maximum: 100 created_at: type: string format: date-time started_at: type: string format: date-time finished_at: type: string format: date-time revision: type: integer minimum: 0 JobDetail: type: object additionalProperties: false required: - id - kind - workspace_id - mutating - status - progress - created_at - revision - warnings - needs_compensation_check properties: id: type: string minLength: 1 maxLength: 256 kind: type: string minLength: 1 workspace_id: type: string minLength: 1 mutating: type: boolean status: $ref: "#/components/schemas/JobStatus" progress: type: integer minimum: 0 maximum: 100 created_at: type: string format: date-time started_at: type: string format: date-time finished_at: type: string format: date-time revision: type: integer minimum: 0 warnings: type: array items: type: string result: type: object additionalProperties: true error: $ref: "#/components/schemas/JobError" needs_compensation_check: type: boolean description: Deliberately omits the persisted request and raw creator identity. JobStatus: type: string enum: [queued, running, succeeded, failed, canceled, interrupted] JobError: type: object additionalProperties: false required: [code, message] properties: code: type: string minLength: 1 message: type: string detail: $ref: "#/components/schemas/JobErrorDetail" JobErrorDetail: type: object additionalProperties: false required: [blocked] properties: blocked: type: array minItems: 1 maxItems: 256 items: type: string minLength: 1 maxLength: 4096 JobEvent: type: object additionalProperties: false required: [api_version, id, job_id, timestamp, kind] properties: api_version: $ref: "#/components/schemas/APIVersion" id: type: integer minimum: 1 job_id: type: string timestamp: type: string format: date-time kind: type: string data: type: object additionalProperties: true description: JSON object serialized in each SSE `job` event's data field. EventGapProblem: type: object additionalProperties: false required: - api_version - type - title - status - detail - code - job_id - requested_after - pruned_through - oldest_available - latest_id properties: api_version: $ref: "#/components/schemas/APIVersion" type: type: string format: uri-reference title: type: string status: type: integer const: 410 detail: type: string code: type: string const: event_gap job_id: type: string requested_after: type: integer minimum: 0 pruned_through: type: integer minimum: 0 oldest_available: type: integer minimum: 0 latest_id: type: integer minimum: 0 WorkspaceListResponse: type: object additionalProperties: false required: [api_version, items, next_cursor] properties: api_version: $ref: "#/components/schemas/APIVersion" items: type: array items: $ref: "#/components/schemas/WorkspaceListItem" next_cursor: $ref: "#/components/schemas/NextCursor" WorkspaceListItem: type: object additionalProperties: false required: [id] properties: id: type: string minLength: 1 maxLength: 64 pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$" WorkspaceStatusResponse: type: object additionalProperties: false required: - api_version - workspace_id - active_deployment - runtime_status - runtime_healthy - runtime_probe_error - module_runtime - activated_at - verified_at - previous_deployments properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string active_deployment: $ref: "#/components/schemas/NullableString" runtime_status: type: [string, "null"] enum: [running, stopped, degraded, not_applicable, unknown, null] description: Live Compose-derived aggregate; never copied from active.yml. runtime_healthy: $ref: "#/components/schemas/NullableBoolean" runtime_probe_error: type: [string, "null"] enum: [runtime_probe_unavailable, runtime_probe_failed, null] module_runtime: type: array items: $ref: "#/components/schemas/ModuleRuntimeStatus" activated_at: $ref: "#/components/schemas/NullableTimestamp" verified_at: $ref: "#/components/schemas/NullableTimestamp" previous_deployments: type: array items: type: string ModuleRuntimeStatus: type: object additionalProperties: false required: [module, runtime, health, containers] properties: module: type: string runtime: type: string enum: [running, stopped, degraded, unknown, not_applicable] health: type: string enum: [healthy, unhealthy, starting, none, not_applicable] temp_storage: $ref: "#/components/schemas/ModuleTemporaryStorageStatus" containers: type: integer minimum: 0 ModuleTemporaryStorageStatus: type: object additionalProperties: false required: [state, issues] properties: state: type: string enum: [ok, low_space, unavailable, unknown, not_applicable] issues: type: array items: $ref: "#/components/schemas/ModuleTemporaryStorageIssue" free_bytes: type: integer minimum: 0 free_inodes: type: integer minimum: 0 description: Omitted when the filesystem has no fixed inode capacity. ModuleTemporaryStorageIssue: type: object additionalProperties: false required: [code, name] properties: code: type: string name: type: string description: Module declaration name; host paths and temporary file contents are never returned. DeploymentListResponse: type: object additionalProperties: false required: [api_version, workspace_id, items, next_cursor] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string items: type: array items: $ref: "#/components/schemas/DeploymentState" next_cursor: $ref: "#/components/schemas/NullableString" DeploymentDetailResponse: type: object additionalProperties: false required: [api_version, workspace_id, deployment, state] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string deployment: $ref: "#/components/schemas/Deployment" state: $ref: "#/components/schemas/DeploymentState" DeploymentState: type: object additionalProperties: false required: - id - status - created_at - activated_at - deactivated_at - verified_at - predecessor - failure properties: id: type: string status: type: string description: One of `ready`, `active`, `previous`, or `failed`; empty when a legacy artifact has no independent state record. created_at: type: string activated_at: $ref: "#/components/schemas/NullableTimestamp" deactivated_at: $ref: "#/components/schemas/NullableTimestamp" verified_at: $ref: "#/components/schemas/NullableTimestamp" predecessor: $ref: "#/components/schemas/NullableString" failure: $ref: "#/components/schemas/NullableString" Deployment: type: object additionalProperties: false description: Safe, path-free projection of an `anas.deployment/v1` manifest. required: - api_version - id - created_at - images_built - build_acceleration - module_order - capability_bindings - modules - settings - resources - snapshot properties: api_version: type: string const: anas.deployment/v1 id: type: string created_at: type: string images_built: type: boolean build_acceleration: type: boolean module_order: type: array items: type: string capability_bindings: type: object additionalProperties: type: object additionalProperties: type: string modules: type: object additionalProperties: $ref: "#/components/schemas/DeploymentModule" settings: type: object additionalProperties: $ref: "#/components/schemas/DeploymentSetting" resources: type: array items: $ref: "#/components/schemas/DeploymentResource" snapshot: $ref: "#/components/schemas/DeploymentSnapshotPolicy" DeploymentModule: type: object additionalProperties: false required: - name - version - revision - app_version - lifecycle - artifact_deployment - data_breaking - runtime - env_prefix - consumes - dependencies - host_lan properties: name: type: string version: type: string revision: type: integer app_version: $ref: "#/components/schemas/NullableString" lifecycle: type: string artifact_deployment: type: string data_breaking: type: [array, "null"] items: type: string runtime: type: string env_prefix: $ref: "#/components/schemas/NullableString" consumes: type: array items: type: string dependencies: type: array items: type: string host_lan: $ref: "#/components/schemas/NullableString" DeploymentSetting: type: object additionalProperties: false required: [module, parameter, effect, apply] properties: module: type: string parameter: type: string effect: type: string apply: $ref: "#/components/schemas/NullableString" DeploymentResource: type: object additionalProperties: false required: [consumer, id, contract, contract_version, provider, interface] properties: consumer: type: string id: type: string contract: type: string contract_version: type: string provider: type: string interface: type: string DeploymentSnapshotPolicy: type: object additionalProperties: false required: [backend, keep_auto] properties: backend: $ref: "#/components/schemas/NullableString" keep_auto: type: integer ModuleCommandListResponse: type: object additionalProperties: false required: [api_version, workspace_id, active_deployment, items, next_cursor] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string active_deployment: $ref: "#/components/schemas/NullableString" items: type: array items: $ref: "#/components/schemas/ModuleCommand" next_cursor: $ref: "#/components/schemas/NextCursor" ModuleListResponse: type: object additionalProperties: false required: [api_version, workspace_id, active_deployment, modules, next_cursor] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string minLength: 1 active_deployment: $ref: "#/components/schemas/NullableString" modules: type: array items: $ref: "#/components/schemas/ModuleState" next_cursor: $ref: "#/components/schemas/NextCursor" ComputeLeaseNetworkResponse: type: object additionalProperties: false required: [api_version, workspace_id, active_deployment, leases] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string minLength: 1 active_deployment: $ref: "#/components/schemas/NullableString" leases: type: array items: $ref: "#/components/schemas/ComputeLeaseNetwork" ComputeLeaseNetwork: type: object additionalProperties: false required: [consumer, resource, provider, interface, sandbox, status, egress, module_access, intra_lease, ingress, http_ports, http_publications, port_bindings, instances, directions] properties: consumer: {type: string} resource: {type: string} provider: {type: string} interface: type: string enum: [incus_vm, incus_container] sandbox: {type: string} status: type: string description: Resource state, with the revocation outcome appended for a retained lease. bridge: {type: string} ipv4_subnet: {type: string} ipv4_gateway: {type: string} ipv6_subnet: {type: string} ipv6_gateway: {type: string} egress: type: string enum: [internet, internet_lan, internet_lan_host, modules_only] module_access: {type: boolean} intra_lease: {type: boolean} ingress: type: string enum: [none, published] http_ports: type: array items: {type: integer, minimum: 1, maximum: 65535} http_publications: type: array items: $ref: "#/components/schemas/ComputeHTTPPublication" port_bindings: type: array items: $ref: "#/components/schemas/ComputePortBinding" instances: type: array items: $ref: "#/components/schemas/ComputeLeaseInstance" instances_error: {type: string} directions: type: array items: $ref: "#/components/schemas/ComputeNetworkDirection" ComputeHTTPPublication: type: object additionalProperties: false required: [host, instance, address, port] properties: host: {type: string} instance: {type: string} address: {type: string} port: {type: integer, minimum: 1, maximum: 65535} ComputePortBinding: type: object additionalProperties: false required: [protocol, host_port, auto, slot, instance, guest_port] properties: protocol: type: string enum: [tcp, udp] host_port: {type: integer, minimum: 1, maximum: 65535} auto: {type: boolean} slot: {type: string} instance: {type: string} ipv4: {type: string} ipv6: {type: string} guest_port: {type: integer, minimum: 1, maximum: 65535} ComputeLeaseInstance: type: object additionalProperties: false required: [name, status, addresses] properties: name: {type: string} status: {type: string} addresses: type: array items: {type: string} slot: {type: string} ComputeNetworkDirection: type: object additionalProperties: false required: [flow, peer, allowed] properties: flow: type: string enum: [egress, ingress] peer: type: string enum: [gateway_dns_dhcp, internet, lan, host, docker_published, docker_unpublished, modules, other_leases, link_local, same_lease, traefik, port_binding_clients, docker_containers] allowed: {type: boolean} ModuleState: type: object additionalProperties: false required: [name, configuration_state, installed_release, desired_release, deployed_release, runtime, health, containers, dependencies, entry_points] properties: name: type: string pattern: "^[a-z][a-z0-9_]*$" configuration_state: type: string enum: [available, selected, dependency] installed_release: $ref: "#/components/schemas/NullableString" desired_release: $ref: "#/components/schemas/NullableString" deployed_release: $ref: "#/components/schemas/NullableString" runtime: type: string minLength: 1 health: type: string minLength: 1 containers: type: integer minimum: 0 dependencies: type: array items: type: string uniqueItems: true entry_points: type: array items: $ref: "#/components/schemas/ModuleManagementSurface" ModuleManagementSurface: type: object additionalProperties: false required: [id, uri, authentication] properties: id: type: string minLength: 1 uri: type: string format: uri pattern: "^https?://" authentication: type: string ModuleCatalogResponse: type: object additionalProperties: false required: [api_version, workspace_id, catalog, next_cursor] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string minLength: 1 catalog: $ref: "#/components/schemas/ModuleCatalog" next_cursor: $ref: "#/components/schemas/NextCursor" ModuleCatalog: type: object additionalProperties: false required: [source, catalog_reference, catalog_digest, source_commit, modules] properties: source: type: string minLength: 1 catalog_reference: type: string minLength: 1 catalog_digest: type: string pattern: "^sha256:[0-9a-f]{64}$" source_commit: type: string modules: type: array items: $ref: "#/components/schemas/ModuleCatalogEntry" ModuleCatalogEntry: type: object additionalProperties: false required: [module, release, repository, platforms] properties: module: type: string pattern: "^[a-z][a-z0-9_]*$" release: type: string minLength: 1 repository: type: string minLength: 1 platforms: type: array items: type: string uniqueItems: true ModuleUpdateRequest: type: object additionalProperties: false required: [mode] properties: mode: type: string enum: [sync, update] modules: type: array description: Valid only for update mode; omission updates all selected Modules. items: type: string pattern: "^[a-z][a-z0-9_]*$" uniqueItems: true ModuleCommandDetailResponse: type: object additionalProperties: false required: [api_version, workspace_id, command] properties: api_version: $ref: "#/components/schemas/APIVersion" workspace_id: type: string command: $ref: "#/components/schemas/ModuleCommand" ModuleCommandInvokeRequest: type: object additionalProperties: false required: [command_digest] properties: command_digest: description: | The `digest` of the descriptor read from the command endpoints. The server refuses the invocation when the active deployment no longer freezes that exact descriptor. type: string minLength: 1 maxLength: 256 parameters: description: | Typed parameter values normalized and validated against the frozen descriptor. Keys not declared by the descriptor are rejected; the server never accepts argv, a shell string, or an environment. type: object additionalProperties: true step_up_proof: description: | Required only for a descriptor declaring `risk: destructive`, and rejected for any other command. type: string minLength: 1 maxLength: 256 ModuleCommand: type: object additionalProperties: false required: - module - release - deployment_id - id - title - description - mode - risk - runtime_state - lock - timeout_seconds - cancellable - parameters - digest - available properties: module: type: string release: type: string deployment_id: type: string id: type: string pattern: "^[a-z][a-z0-9-]{0,62}$" title: type: string description: type: string mode: type: string enum: [query, change] risk: type: string enum: [normal, destructive] runtime_state: type: string enum: [running, stopped, any] lock: type: string enum: [module_read, module_write, workspace_write] timeout_seconds: type: integer minimum: 1 maximum: 3600 cancellable: type: string enum: ["false", "true", safe_points] parameters: type: array items: $ref: "#/components/schemas/ModuleCommandParameter" digest: type: string pattern: "^sha256:[0-9a-f]{64}$" available: type: boolean unavailable_reason: type: string ModuleCommandParameter: type: object additionalProperties: false required: [name, title, description, type, allowed_values, constraints, required] properties: name: type: string pattern: "^[a-z][a-z0-9_]{0,62}$" title: type: string description: type: string type: type: string enum: [string, int, bool, enum] allowed_values: type: array items: type: string uniqueItems: true constraints: $ref: "#/components/schemas/ModuleCommandConstraints" required: type: boolean default: oneOf: - type: string - type: integer - type: boolean ModuleCommandConstraints: type: object additionalProperties: false properties: minimum: type: integer maximum: type: integer min_length: type: integer minimum: 0 max_length: type: integer minimum: 0 pattern: type: string format: type: string NullableString: type: [string, "null"] NullableBoolean: type: [boolean, "null"] NullableTimestamp: type: [string, "null"] Problem: type: object additionalProperties: false required: [api_version, type, title, status, detail, code] properties: api_version: $ref: "#/components/schemas/APIVersion" type: type: string format: uri-reference title: type: string status: type: integer minimum: 400 maximum: 599 detail: type: string code: type: string pattern: "^[a-z][a-z0-9_]*$"