List 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.
Authorization
BearerAuth A namespace-scoped API key (cpk_…) for machines, or a Xeonr Auth OIDC
token for humans. The key's namespace and role are pinned server-side.
In: header
Header Parameters
Define the version of the Connect protocol
Define the timeout, in ms
Request Body
application/json
Required for non-admin callers; empty lists every namespace (admin only).
length <= 64optional filter
length <= 64optional filter (UNSPECIFIED = any) enum.defined_only = true
"JOB_STATE_UNSPECIFIED" | "JOB_STATE_QUEUED" | "JOB_STATE_RUNNING" | "JOB_STATE_SUCCEEDED" | "JOB_STATE_FAILED" | "JOB_STATE_CANCELLED"validate:skip 0 means 100; larger values are clamped to 1000, not rejected
Response Body
application/json
application/json
curl -X POST "https://containers.xeonr.io/containers.api.v1.JobService/ListJobs" \ -H "Connect-Protocol-Version: 1" \ -H "Connect-Timeout-Ms: 1000" \ -H "Content-Type: application/json" \ -d '{}'{
"jobs": [
{
"jobId": "string",
"namespace": "string",
"environmentId": "string",
"state": "JOB_STATE_UNSPECIFIED",
"poolLane": "string",
"createdAtUnix": "string",
"finishedAtUnix": "string",
"result": {
"jobId": "string",
"exitCode": 0,
"termination": "TERMINATION_UNSPECIFIED",
"stdout": "string",
"outputs": [
{
"name": "string",
"sha256": "string",
"size": "string",
"mime": "string",
"content": null
}
],
"kv": {
"property1": {},
"property2": {}
},
"usage": {
"cpuMillisUsed": "string",
"memoryPeakMb": "string",
"wallMs": "string"
},
"stderr": "string",
"terminationDetail": "string",
"terminationReason": "string",
"logSpans": [
{
"offset": "string",
"length": 0,
"stderr": true
}
],
"services": [
{
"name": "string",
"outcome": "SERVICE_CONTAINER_OUTCOME_UNSPECIFIED",
"started": true,
"ready": true,
"exitCode": 0,
"reason": "string",
"restarts": 0,
"logTail": "string"
}
]
},
"spec": {
"argv": [
"string"
],
"egress": {
"egressPolicyId": "string"
},
"resources": {
"cpuMillis": 0,
"memoryMb": 0,
"ephemeralMb": 0,
"pids": 0,
"cpuLimitMillis": 1024000,
"memoryLimitMb": 4194304
},
"timeoutSec": 0,
"workspaceId": "string",
"stdin": "string",
"inputs": [
{
"path": "string",
"content": null
}
],
"outputs": [
{
"name": "string",
"kind": "KIND_UNSPECIFIED",
"path": "string",
"maxBytes": "string",
"required": true,
"mimeHint": "string"
}
],
"callback": {
"endpoint": "string",
"token": "string"
},
"label": "string",
"env": {
"property1": "string",
"property2": "string"
},
"adapter": {
"environmentId": "string",
"env": {
"property1": "string",
"property2": "string"
},
"cpuMillis": 0,
"memoryMb": 0,
"startup": {
"timeoutSec": 3600,
"periodSec": 30,
"exec": {
"argv": [
"string"
]
}
}
},
"workspaces": [
{
"snapshotId": "string",
"mountPath": "string",
"readOnly": true,
"workspaceId": "string",
"ephemeral": true,
"ephemeralFromSnapshotId": "string",
"volume": {
"backingId": "string",
"backingGeneration": "string",
"attachmentId": "string",
"attachmentGeneration": "string",
"executionAuthorityRequired": true,
"nodeId": "string",
"sizeMb": "string",
"seedSnapshotId": "string",
"cacheKey": "string"
}
}
],
"workingDir": "string",
"executionSandboxId": "string",
"executionGeneration": "string",
"executionPodUid": "string",
"executionOperatorEpoch": "string",
"executionReleased": true,
"services": [
{
"name": "mysql",
"environmentId": "env-0123456789abcdef",
"command": [
"string"
],
"args": [
"string"
],
"env": {
"property1": "string",
"property2": "string"
},
"cpuMillis": 8000,
"memoryMb": 16384,
"readiness": {
"timeoutSec": 600,
"periodSec": 30,
"exec": {
"argv": [
"string"
]
}
},
"ephemeralMb": 10240
}
]
},
"label": "string"
}
],
"nextPageToken": "string",
"total": 0
}Get Job Logs POST
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`
Run Job POST
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.