Skip to Content
Xeonr Developer Docs
API Specification

Sandboxes

Long-lived interactive sessions — exec, suspend/resume, live egress grants and preview URLs.

postAbandon a Parked Sandbox Move

Ends a NEEDS_ACTION move. Before promotion: releases the move's fences and locks, leaves the sandbox stopped on its source and ends the operation CANCELLED. After promotion with no surviving copy anywhere: ends it FAILED/world_lost when accept_world_lost is set. A move whose world exists on its target must be retried or re-targeted instead.

postCreate Sandbox

Creates a sandbox from an environment in the same namespace and starts its pod. Resolves the workload command (request argv, then the environment's default_argv, then the image ENTRYPOINT/CMD; exec_only runs nothing), creates any ephemeral workspace mounts, and applies the base egress policy (deny-all when none is given; the egress bootstrap defaults to 24h when max_lifetime_sec is 0). Rejects an environment in another namespace (PermissionDenied), platform-owned env names (InvalidArgument), both workspace_id and workspaces set, more than 8 mounts, a non-absolute or unclean working_dir, and a durable workspace already attached to another live sandbox (FailedPrecondition). Unimplemented without cluster access. **Access:** namespace OPERATOR or above (write)

postDelete Sandbox

Deletes a sandbox: hard-kills its pod, revokes its agent key, drops its egress binding, console sessions and preview exposures, removes the record, then deletes any ephemeral workspaces it owned. No flush and no snapshot: snapshot first to keep content. **Access:** namespace OPERATOR or above (write)

postExec In Sandbox

Bidirectional stream running an argv (never shell-joined) in a RUNNING sandbox. The first client message must be the ExecSpec; later messages are stdin chunks or stdin_close. The server streams stdout/stderr frames then a final exit whose code/termination is status-derived; a timeout_sec deadline yields TERMINATION_TIMEOUT with code -1. Keeps the idle-suspend clock fresh for the session. Rejects an empty argv and wait=EXEC_WAIT_PROCESS combined with tty (InvalidArgument), and a sandbox that is not running (FailedPrecondition). **Access:** namespace OPERATOR or above (write)

postExpose Sandbox Port

Publishes a sandbox port on an isolated preview URL and records it on the sandbox; idempotent per port. port must be 1-65535, and 53, 80 and 443 are refused because the egress capture owns them (InvalidArgument). Only AUTH_SIGNED_URL returns an access token (embedded in the URL); FORWARD_AUTH and PUBLIC are resolved at access time. Unimplemented when no preview domain is configured. **Access:** namespace OPERATOR or above (write)

postGet Sandbox

Returns one sandbox. Egress fields are filled from the live egress binding, so they show what the proxy enforces now (expired grants are omitted). NotFound for an unknown id. **Access:** namespace VIEWER or above (read)

postGet Sandbox Logs

Returns retained run-log chunks of a sandbox (the same records TailSandboxLogs streams). With `from_offset` 0 it returns the latest chunks, oldest first; otherwise the chunks after that cursor. At most `limit` chunks (0 means 200, at most 2000) and about `limit_bytes` of output (0 means 65536, at most 1048576; a chunk is never split). `next_offset` is the cursor of the last chunk returned, for a forward read; `more` says later chunks exist. **Access:** namespace VIEWER or above (read) **Required scopes:** `container-platform:namespaces:read`

postGrant Egress

Adds one additive, independently revocable egress grant on top of the sandbox's base policy; the egress in force is the base unioned with every active grant. Takes effect on the proxy through the live policy feed without a restart. ttl_sec 0 means no expiry; otherwise at most 86400. The reason is recorded in the audit log. Rejects a missing policy (InvalidArgument) and a sandbox created without egress configured (FailedPrecondition); Unimplemented when egress signing is not configured. Returns the new grant id. **Access:** namespace OPERATOR or above (write)

postKeep Sandbox Alive

Restarts the idle-suspend clock without running anything in the sandbox, and returns when the sandbox would next be idle-suspended (0 when idle_suspend_sec is 0). Deliberately a read-level operation. FailedPrecondition when the sandbox is not RUNNING. **Access:** namespace VIEWER or above (read)

postList Persistent Sandbox Move Targets

Lists enrolled nodes for the sandbox's existing Games-managed namespace and cluster, with live exact-node readiness and required move capabilities. The caller supplies no cluster ID. Only the verified Games managed-product service identity may read choices; browser clients call this through Games.

postList Sandboxes

Lists sandboxes in a namespace, newest first, optionally filtered by state. namespace is required unless the caller is a platform admin (empty then lists every namespace). page_size defaults to 100 and is clamped to 1000. **Access:** namespace VIEWER or above (read)

postMove Persistent Sandbox

Admits a durable move of one persistent service sandbox and all of its exclusive writable volumes to another node in the same cluster. The control plane derives the complete mounted exclusive-volume set from the stored sandbox; callers cannot omit a world. Requires the current sandbox revision and execution generation. The operation fences and stops the source, verifies detach, copies and verifies the exact backing contents, atomically promotes all target backings, releases target CSI authority, and resumes only when the sandbox was previously desired to run.

postResume Sandbox

Reschedules a suspended (or crashed) sandbox's pod from its persisted record: same command, resources, env, mounts and base egress, with a fresh agent key and control token. Clears any dead pod carrying the sandbox's name first. FailedPrecondition when a durable workspace it mounts was attached to another live sandbox in the meantime. **Access:** namespace OPERATOR or above (write)

postRe-target a Parked Sandbox Move

Continues a NEEDS_ACTION move to a different eligible node under the same operation, reusing the transfer machinery with the world's current location as the source. Refused while the move is parked between promotion and the target's release (retry it instead). Repeating the call with the move's current target resumes it.

postRevoke Egress

Removes exactly one grant by id, leaving the base policy and other grants intact; takes effect on the proxy via the live feed. grant_id is required (InvalidArgument); an unknown grant is NotFound. **Access:** namespace OPERATOR or above (write)

postStop Persistent Sandbox

Sends the configured stop command or signal to the exact running persistent service generation, waits for process exit, pod removal, and confirmed writable-volume detach, then returns the sandbox in STOPPED state. The command is a single bounded line delivered as process input; it is never shell-evaluated. Retries with the same key and request return the original outcome.

postSuspend Sandbox

Suspends a sandbox: records a SUSPENDED marker in the run log, deletes the pod gracefully (30s grace when a writable workspace needs flushing, 10s otherwise), marks the record SUSPENDED, revokes the agent key and marks console sessions lost. Workspaces and the egress binding are kept for resume. **Access:** namespace OPERATOR or above (write)

postTail Sandbox Logs

Streams the sandbox's retained run log (workload output plus typed lifecycle markers) across its whole life, including suspends. Starts after from_offset (0 = oldest retained), optionally restricted to one run. limit caps history replayed per read (0 = 2000). With follow, stays open and polls for new output about every 2 seconds. sandbox_id is required (InvalidArgument). **Access:** namespace VIEWER or above (read)

postUnexpose Sandbox Port

Drops a port from the sandbox's preview exposures. Metadata only: already-issued tokens stop working when they expire. A port that is not exposed is a no-op. Unimplemented when no preview domain is configured. **Access:** namespace OPERATOR or above (write)

postValidate Workload Spec

Dry-runs the requested installer and runtime requirements against the namespace's current cluster capabilities and platform runtime profiles. A disconnected or stale operator is never treated as certified.

postWatch Sandbox

Server stream of sandbox state changes, derived from the record and the live pod phase and polled about every 2 seconds. Emits only on change and ends once the sandbox is TERMINATED. Unimplemented without cluster access. **Access:** namespace VIEWER or above (read)