Sign Up

Jobs

GET/jobs

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

AuthorizationBearer <token>

API Key access

In: header

Query Parameters

page?number

Page number of the results

Range1 <= value
Default1
limit?number

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?number

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

Response Body

application/json

curl -X GET "https://example.com/jobs"
{  "items": [    {      "id": "job123",      "type": "CREATE_SANDBOX",      "status": "PENDING",      "resourceType": "SANDBOX",      "resourceId": "sandbox123",      "payload": "string",      "traceContext": {        "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"      },      "errorMessage": "Failed to create sandbox",      "createdAt": "2024-10-01T12:00:00Z",      "updatedAt": "2024-10-01T12:00:00Z"    }  ],  "total": 0,  "page": 0,  "totalPages": 0}
GET/jobs/poll

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

AuthorizationBearer <token>

API Key access

In: header

Query Parameters

timeout?number

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

limit?number

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

Response Body

application/json

curl -X GET "https://example.com/jobs/poll"
{  "jobs": [    {      "id": "job123",      "type": "CREATE_SANDBOX",      "status": "PENDING",      "resourceType": "SANDBOX",      "resourceId": "sandbox123",      "payload": "string",      "traceContext": {        "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"      },      "errorMessage": "Failed to create sandbox",      "createdAt": "2024-10-01T12:00:00Z",      "updatedAt": "2024-10-01T12:00:00Z"    }  ]}
GET/jobs/{jobId}
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

jobId*string

ID of the job

Response Body

application/json

curl -X GET "https://example.com/jobs/string"
{  "id": "job123",  "type": "CREATE_SANDBOX",  "status": "PENDING",  "resourceType": "SANDBOX",  "resourceId": "sandbox123",  "payload": "string",  "traceContext": {    "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"  },  "errorMessage": "Failed to create sandbox",  "createdAt": "2024-10-01T12:00:00Z",  "updatedAt": "2024-10-01T12:00:00Z"}
POST/jobs/{jobId}/status
AuthorizationBearer <token>

API Key access

In: header

Path Parameters

jobId*string

ID of the job

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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