Jobs and executions
Deploy jobs, start and schedule runs, cancel them, and read jobs with their executions.
These are the only endpoints project keys can call (with the scope shown). Any team member can call them with a user token.
Objects
Job
{
"id": "6b1f…",
"project_id": "c2a9…",
"name": "nightly-report",
"driver": "node",
"cmd": "node dist/index.js",
"install": "npm ci --omit=dev",
"secrets": ["SLACK_WEBHOOK_URL"],
"params": ["REPORT_DATE"],
"schedule": "0 6 * * *",
"inserted_at": "2026-11-20T10:00:00Z",
"updated_at": "2026-11-23T09:12:44Z"
}install, secrets, params and schedule can be null.
Execution
{
"id": "9f1c…",
"status": "success",
"source": "cron",
"trigger_id": null,
"error_code": null,
"scheduled_time": "2026-11-23T06:00:00Z",
"duration": 5234123,
"log_url": "https://…",
"inserted_at": "2026-11-22T06:00:04Z",
"updated_at": "2026-11-23T06:00:09Z"
}status:scheduled,running,success,fail,cancelled,missed.source:manual,cronortrigger.error_code:missing_secrets,quota_exceeded,orphanedornull.durationis in microseconds.log_urlexpires 7 days after the run.
See Executions.
POST /jobs/deploy
Scope: deploy. Creates or replaces a job. multipart/form-data:
| Field | Required | Description |
|---|---|---|
zip | yes | The job's files as a zip archive. Its root becomes /work. |
project_id | yes | Project ID. |
name | yes | Job name. An existing name is replaced. |
driver | yes | node, python or go. |
cmd | yes | Command to run. |
install | no | Command run before cmd. |
secrets[] | no | Repeat for each declared secret name. |
params[] | no | Repeat for each declared param name. |
schedule | no | Cron expression (UTC). |
curl -X POST "$API/jobs/deploy" -H "Authorization: Bearer $TOKEN" \
-F zip=@nightly-report.zip -F project_id=$PROJECT_ID -F name=nightly-report \
-F driver=node -F "cmd=node dist/index.js" -F "secrets[]=SLACK_WEBHOOK_URL" \
-F "schedule=0 6 * * *"201, not wrapped in data:
{ "status": "created", "job_id": 1234, "warnings": { "missing_secrets": ["SLACK_WEBHOOK_URL"] } }job_id here is an internal ID for the background unpack task, not the job's
UUID. warnings appears only when declared secrets aren't set. Files are
unpacked asynchronously; listen for job.deployment_succeeded or
job.deployment_failed webhooks.
Errors: 400 missing zip, 422 {"error": "Invalid cron schedule."},
422 {"error": "Invalid job arguments."} (missing field or reserved name). The
zip and schedule are checked before anything is saved, so a rejected deploy
leaves the existing job unchanged.
POST /jobs/run
Scope: run. Starts a run as soon as possible.
{ "job": { "name": "nightly-report", "project_id": "c2a9…", "params": { "REPORT_DATE": "2026-11-22" } } }params is optional. Values must be strings; names must match
^[A-Za-z_][A-Za-z0-9_]*$ and not start with APERTURE_.
200:
{ "data": { "name": "nightly-report", "execution_id": "9f1c…" } }Errors: 402 quota exceeded, 404 {"error": "No such job"}, 422 invalid
params (with a names list).
POST /jobs/schedule
Scope: run. Starts a run at a given time.
{
"job": { "name": "nightly-report", "project_id": "c2a9…", "params": {} },
"run_at": "2026-11-24T06:00:00Z"
}run_at must be ISO 8601 with a UTC offset or Z; anything else returns
422.
200:
{
"data": {
"name": "nightly-report",
"execution_id": "9f1c…",
"run_at_local": "2026-11-24T06:00:00Z",
"run_at_utc": "2026-11-24 06:00:00Z"
}
}PUT /jobs/{execution_id}/cancel
Scope: run. Cancels an execution that is still scheduled. Returns the
updated execution in data. Any other status returns
404 {"error": "No such execution"}.
GET /jobs/project/{project_id}
Scope: read. Lists the project's jobs: {"data": [Job, ...]}.
GET /jobs/team/{team_id}
User tokens only. Lists jobs across all the team's projects.
GET /jobs/{id}/details
Scope: read. Returns a job with all its executions and the declared secrets
that are missing from the project:
{
"data": {
"id": "6b1f…",
"name": "nightly-report",
"…": "…",
"missing_secrets": [],
"executions": [ { "id": "9f1c…", "status": "success", "…": "…" } ]
}
}Executions aren't sorted; sort them by scheduled_time or inserted_at.