Jobs
Run-to-completion workloads with argv, stdin, input files, collected outputs and streamed logs.
postCancel Job
Deletes the job's pod and marks the job CANCELLED. The current state is not checked, so an already-finished job is re-marked CANCELLED too. **Access:** operator or admin role in the namespace (via Xeonr team role or a namespace API key), or a platform admin.
postCreate Job
Starts a batch job and returns once it is admitted, with its id; the job runs to completion in the background exactly as one started with RunJob (same validation, admission, pool routing and idempotency). A repeated `idempotency_key` within the namespace returns the original job's id with `existing` set. Jobs with `execution_sandbox_id` (guarded setup writers) are refused with InvalidArgument: start those with RunJob. Follow the job with GetJob and GetJobLogs or TailLogs. **Access:** operator or admin role in the namespace (via Xeonr team role or a namespace API key), or a platform admin. **Required scopes:** `container-platform:namespaces:edit`
postGet Job
Returns a job record, including its persisted spec and, once terminal, its result (captured stdout/stderr are capped at 256 KiB each). **Access:** any role in the namespace (viewer, operator or admin — via Xeonr team membership or a namespace API key), or a platform admin.
postGet Job Logs
Returns up to `limit_bytes` (0 means 65536, at most 1048576) of a job's interleaved log as chunks, each with its offset and stderr flag. With `from_offset` 0 and `from_start` false it returns the last `limit_bytes` of the log; otherwise it reads forward from `from_offset`. `next_offset` resumes the read; `more` says output past it already exists. A terminal job is read from its stored copy (the first 256 KiB of each stream); a running job is read from its pod, which holds what it has written so far. Unimplemented for a running job when the api has no cluster access. **Access:** any role in the namespace (viewer, operator or admin — via Xeonr team membership or a namespace API key), or a platform admin. **Required scopes:** `container-platform:namespaces:read`
postList Jobs
Lists jobs newest first, optionally filtered by `environment_id` and `state` (UNSPECIFIED = any). `page_size` 0 means 100 and is clamped to 1000; `page_token` is the opaque offset from `next_page_token`. An empty `namespace` lists every namespace and is refused (InvalidArgument) for anyone but a platform admin. **Access:** any role in the namespace (viewer, operator or admin — via Xeonr team membership or a namespace API key), or a platform admin.
postRun Job
Runs a batch job to completion and streams its progress: an `accepted` event carrying the job id first, then state changes, log chunks and a final `result`. `environment_id` must name an environment in the same namespace. Empty `argv` falls back to the environment's default argv, then the image entrypoint. `timeout_sec` 0 means 300. A `pool_lane` with a configured pool and a pool-compatible shape (argv set; no workspace, inputs, outputs, adapter or secrets) is served from a warm pod; otherwise the job cold-starts. A repeated `idempotency_key` within the namespace re-attaches to the original job instead of starting a new one. `secrets` require an `adapter`; `inputs`/`outputs` require a writable mount (one is synthesised at /work when no mounts are declared); at most 8 `workspaces`; at most 4 `services` (each named as a DNS label, unique, on an environment of the job's runtime; together at most 8000 millicores and 16384 MiB), never with a `pool_lane`-served job or a guarded setup job, and only on a cluster whose operator supports them (FailedPrecondition otherwise); env names in the CP_ prefix or set by the platform are rejected. The job keeps running if the stream is dropped. **Access:** operator or admin role in the namespace (via Xeonr team role or a namespace API key), or a platform admin.
postTail Logs
Streams a job's log from byte `from_offset` of its interleaved log (stdout and stderr in the order written); every chunk's `offset` is the position of its first byte in that log, so a client resumes from `offset + len(data)` of the last chunk it kept. For a running job this follows the pod's output live (stdout/stderr split where the job was supervised); for a terminal job it serves the copy stored on the record, both streams in their original order with the stderr flag kept. The stored copy keeps the first 256 KiB of each stream, so an ended job's log can have gaps (the offsets jump) where a stream was cut. Returns Unimplemented for a live job when the api has no cluster access. **Access:** any role in the namespace (viewer, operator or admin — via Xeonr team membership or a namespace API key), or a platform admin. **Required scopes:** `container-platform:namespaces:read`
Write Container File POST
Client-streaming write into a running workload's container: the first message must be the header (InvalidArgument otherwise), later messages are data. Overwrites by default (mode 0 means 0644); APPEND and PATCH_AT_OFFSET are also supported. The whole write is capped at 64 MiB. The rootfs is read-only unless the environment sets writable_rootfs, so writes usually land only in mounted volumes. The target must be a RUNNING sandbox or job (FailedPrecondition otherwise); errno is mapped to a status (ENOENT NotFound, EEXIST AlreadyExists, EACCES/EPERM PermissionDenied, EROFS FailedPrecondition, ENOSPC ResourceExhausted). /.cp is hidden. Unavailable when the in-container handler is not running; Unimplemented without cluster access. **Access:** namespace OPERATOR or above (write) on the target's namespace. Workspace-scoped credentials (a workload's own agent key) are refused.
Cancel Job POST
Deletes the job's pod and marks the job CANCELLED. The current state is not checked, so an already-finished job is re-marked CANCELLED too. **Access:** operator or admin role in the namespace (via Xeonr team role or a namespace API key), or a platform admin.