Sign Up

Jobs

List jobs for the runner

GET
/jobs

Returns a paginated list of jobs for the runner, optionally filtered by status.

Authorization

headerAuthorizationBearer <token>

API Key access

Query Parameters

page?integer

Page number of the results

Range1 <= value
Default1
limit?integer

Maximum number of jobs to return (default: 100, max: 500)

Range1 <= value <= 200
Default100
status?string

Filter jobs by status

Value in"PENDING""IN_PROGRESS""COMPLETED""FAILED"
offset?integer

Number of jobs to skip for pagination (default: 0)

Response Body

List of jobs for the runner

application/json
  1. response
items*array<>
total*integer
page*integer
totalPages*integer
curl -X GET 'http://localhost:3000/jobs'
{  "total": 0,  "totalPages": 1,  "page": 6,  "items": [    {      "createdAt": "2024-10-01T12:00:00Z",      "resourceId": "sandbox123",      "payload": "payload",      "errorMessage": "Failed to create sandbox",      "id": "job123",      "type": "CREATE_SANDBOX",      "traceContext": {        "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"      },      "status": "PENDING",      "resourceType": "SANDBOX",      "updatedAt": "2024-10-01T12:00:00Z"    },    {      "createdAt": "2024-10-01T12:00:00Z",      "resourceId": "sandbox123",      "payload": "payload",      "errorMessage": "Failed to create sandbox",      "id": "job123",      "type": "CREATE_SANDBOX",      "traceContext": {        "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"      },      "status": "PENDING",      "resourceType": "SANDBOX",      "updatedAt": "2024-10-01T12:00:00Z"    }  ]}

Long poll for jobs

GET
/jobs/poll

Long poll endpoint for runners to fetch pending jobs. Returns immediately if jobs are available, otherwise waits up to timeout seconds.

Authorization

headerAuthorizationBearer <token>

API Key access

Query Parameters

timeout?integer

Timeout in seconds for long polling (default: 30, max: 60)

limit?integer

Maximum number of jobs to return (default: 10, max: 100)

Response Body

List of jobs for the runner

application/json
  1. response
jobs*array<>

List of jobs

curl -X GET 'http://localhost:3000/jobs/poll'
{  "jobs": [    {      "createdAt": "2024-10-01T12:00:00Z",      "resourceId": "sandbox123",      "payload": "payload",      "errorMessage": "Failed to create sandbox",      "id": "job123",      "type": "CREATE_SANDBOX",      "traceContext": {        "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"      },      "status": "PENDING",      "resourceType": "SANDBOX",      "updatedAt": "2024-10-01T12:00:00Z"    },    {      "createdAt": "2024-10-01T12:00:00Z",      "resourceId": "sandbox123",      "payload": "payload",      "errorMessage": "Failed to create sandbox",      "id": "job123",      "type": "CREATE_SANDBOX",      "traceContext": {        "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"      },      "status": "PENDING",      "resourceType": "SANDBOX",      "updatedAt": "2024-10-01T12:00:00Z"    }  ]}

Get job details

GET
/jobs/{jobId}

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

jobId*string

ID of the job

Response Body

Job details

application/json
  1. response
id*string

The ID of the job

type*string

The type of the job

Value in"CREATE_SANDBOX""START_SANDBOX""STOP_SANDBOX""DESTROY_SANDBOX""RESIZE_SANDBOX""CREATE_BACKUP""BUILD_SNAPSHOT""PULL_SNAPSHOT""RECOVER_SANDBOX""INSPECT_SNAPSHOT_IN_REGISTRY""REMOVE_SNAPSHOT""UPDATE_SANDBOX_NETWORK_SETTINGS""UPDATE_SANDBOX_SECRETS""SNAPSHOT_SANDBOX""FORK_SANDBOX""PAUSE_SANDBOX"
status*string

The status of the job

Value in"PENDING""IN_PROGRESS""COMPLETED""FAILED"
resourceType*string

The type of resource this job operates on

Value in"SANDBOX""SNAPSHOT""BACKUP"
resourceId*string

The ID of the resource this job operates on (sandboxId, snapshotRef, etc.)

payload?string

Job-specific JSON-encoded payload data (operational metadata)

traceContext?

OpenTelemetry trace context for distributed tracing (W3C Trace Context format)

errorMessage?string

Error message if the job failed

createdAt*string

The creation timestamp of the job

updatedAt?string

The last update timestamp of the job

curl -X GET 'http://localhost:3000/jobs/string'
{  "createdAt": "2024-10-01T12:00:00Z",  "resourceId": "sandbox123",  "payload": "payload",  "errorMessage": "Failed to create sandbox",  "id": "job123",  "type": "CREATE_SANDBOX",  "traceContext": {    "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"  },  "status": "PENDING",  "resourceType": "SANDBOX",  "updatedAt": "2024-10-01T12:00:00Z"}
POST
/jobs/{jobId}/registry-mtls/{registryId}

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

jobId*string

ID of the job

registryId*string

Registry credential reference from the job payload

Response Body

Ephemeral registry mTLS credentials

application/json
  1. response
certificatePem*string

PEM-encoded client certificate chain

privateKeyPem*string

PEM-encoded unencrypted client private key

caBundlePem?string

PEM-encoded registry CA bundle

curl -X POST 'http://localhost:3000/jobs/string/registry-mtls/string'
{  "certificatePem": "certificatePem",  "privateKeyPem": "privateKeyPem",  "caBundlePem": "caBundlePem"}

Update job status

POST
/jobs/{jobId}/status

Authorization

headerAuthorizationBearer <token>

API Key access

Path Parameters

jobId*string

ID of the job

Request Body

application/json
  1. body
status*string

The new status of the job

Value in"PENDING""IN_PROGRESS""COMPLETED""FAILED"
errorMessage?string

Error message if the job failed

resultMetadata?string

Result metadata for the job

Response Body

Job status updated successfully

application/json
  1. response
id*string

The ID of the job

type*string

The type of the job

Value in"CREATE_SANDBOX""START_SANDBOX""STOP_SANDBOX""DESTROY_SANDBOX""RESIZE_SANDBOX""CREATE_BACKUP""BUILD_SNAPSHOT""PULL_SNAPSHOT""RECOVER_SANDBOX""INSPECT_SNAPSHOT_IN_REGISTRY""REMOVE_SNAPSHOT""UPDATE_SANDBOX_NETWORK_SETTINGS""UPDATE_SANDBOX_SECRETS""SNAPSHOT_SANDBOX""FORK_SANDBOX""PAUSE_SANDBOX"
status*string

The status of the job

Value in"PENDING""IN_PROGRESS""COMPLETED""FAILED"
resourceType*string

The type of resource this job operates on

Value in"SANDBOX""SNAPSHOT""BACKUP"
resourceId*string

The ID of the resource this job operates on (sandboxId, snapshotRef, etc.)

payload?string

Job-specific JSON-encoded payload data (operational metadata)

traceContext?

OpenTelemetry trace context for distributed tracing (W3C Trace Context format)

errorMessage?string

Error message if the job failed

createdAt*string

The creation timestamp of the job

updatedAt?string

The last update timestamp of the job

curl -X POST 'http://localhost:3000/jobs/string/status' \  -H 'Content-Type: application/json' \  -d '{  "resultMetadata": "resultMetadata",  "errorMessage": "Failed to create sandbox",  "status": "IN_PROGRESS"}'
{  "createdAt": "2024-10-01T12:00:00Z",  "resourceId": "sandbox123",  "payload": "payload",  "errorMessage": "Failed to create sandbox",  "id": "job123",  "type": "CREATE_SANDBOX",  "traceContext": {    "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"  },  "status": "PENDING",  "resourceType": "SANDBOX",  "updatedAt": "2024-10-01T12:00:00Z"}