Skip to Content
Xeonr Developer Docs
API SpecificationJobs

Create Job

POST
/containers.api.v1.JobService/CreateJob

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

Authorization

BearerAuth
AuthorizationBearer <token>

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

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

spec*

The job to run, exactly as RunJob takes it. execution_sandbox_id must be empty.

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://containers.xeonr.io/containers.api.v1.JobService/CreateJob" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{    "spec": {}  }'
{
  "jobId": "string",
  "existing": true
}