Skip to content

Reference

Tasks and status

Read the tasks an environment can run, check that a control plane is up, and fetch the OpenAPI document.

On this page

GET /v1/tasks is open to an environment API key, and lists the tasks of the key's environment's current deployment, with each one's size and hot state. The health routes and the OpenAPI document need no token. Operators have a separate status route, which needs the operator token.

List an environment's task definitions#

GET/v1/tasks

Auth: Operator token or Environment API key

The tasks of the environment's current deployment. An unknown environment, or another than an API key's own, is a 404.

Parameters

List an environment's task definitions: parameters
FieldDescription
environmentstring in queryDefault: an API key's own environment, else the one the control plane serves.

Responses

  • 200OK TasksResponse
  • 401Missing or wrong bearer token. Error
  • 404The resource does not exist. Error
Fields of TasksResponse
TasksResponse fields
FieldDescription
deployment_idstring | null requiredThe environment's current deployment; null (with no tasks) when it has none yet.
tasksTaskDefinition[] required
machinesMachinePresetInfo[] requiredThe machine presets a run may choose, smallest first.
environmentstring requiredThe environment whose current deployment is listed.
hotobject requiredPer hot task ID of the current deployment: its warm workers (docs/hot-tasks.md). Empty when no task is hot or nothing is deployed.

Liveness check#

GET/health

Auth: None

Unauthenticated. Answers while the HTTP server runs.

Responses

  • 200OK Health
Fields of Health
Health fields
FieldDescription
okboolean required
prototypeboolean required
versionstring | nullThe build this server runs, when it knows it.

Readiness check#

GET/ready

Auth: None

Unauthenticated, for the hosting platform's health checks. Answers 200 when the database answered a trivial query within 3 seconds, otherwise 503. The database is probed at most once a second, on a connection of its own, and requests in between get the latest answer. The answer never carries connection details; the reason is logged on the server.

Responses

  • 200The database answered. Ready
  • 503The database did not answer in time or refused the connection. Error
Fields of Ready
Ready fields
FieldDescription
okboolean required
databasestring required

This OpenAPI document#

GET/v1/openapi.json

Auth: None

Unauthenticated. The customer view of the document committed at docs/openapi.json: the routes only the operator token can call are left out, with the tags only they use and the schemas and responses only they reach.

Responses

  • 200The customer view of the OpenAPI 3.1 document for this API. object