Jobs and workers
| Route | What it does |
|---|---|
GET /jobs?versionId=&status= | Jobs, filtered |
GET /jobs/:id | A job with its log and error |
GET /versions/:id/jobs | The jobs of a draft or version |
POST /jobs/:id/retry | Run a failed job again |
The worker's side
You only need this to write a worker of your own.
| Route | What it does |
|---|---|
POST /jobs/claim | { workerId, types?, environment? }: hands out the oldest waiting job, to exactly one worker, or nothing |
GET /jobs/:id/context | What the job needs: the document, the version, the files with their SHA-256, for a run its parameters |
POST /jobs/:id/heartbeat | "Still on it." A job without heartbeats goes back to the queue |
POST /jobs/:id/complete | Done, with log lines |
POST /jobs/:id/fail | Failed, with the error. final: true when trying again can't help |
Results are uploaded as files of the job's version, with X-Generator and X-Input-Sha256 saying what made them from what. A result for a source that has changed since is refused.