Ratel Docs
ReferenceHTTP API

Jobs

Poll the status of a background job.

Some work runs in the background, for example an analysis an MCP tool queues. The tool returns a job ID. Poll this endpoint until the job ends.

GET /api/v1/jobs/:id

Returns one job's status and, when it is done, its result.

  • Method and path: GET /api/v1/jobs/:id. There is no /v1/jobs alias.
  • Auth: bearer API key with jobs:read

Request

ParameterInNotes
idpathThe job ID.
curl -s https://cloud.ratel.sh/api/v1/jobs/0b7e3c51-9d2a-4c61-8f0e-5a1d2c3b4e6f \
  -H "Authorization: Bearer $RATEL_API_KEY"

Response

200:

{
  "id": "0b7e3c51-9d2a-4c61-8f0e-5a1d2c3b4e6f",
  "kind": "match_quality_run",
  "status": "running",
  "result": null,
  "error": null
}
  • status: queued, running, done or error. Keep polling while it is queued or running.
  • result: the job's output when done. Its shape depends on kind.
  • error: the failure message when error.

Errors

StatusCause
401Missing, invalid, revoked or expired key.
403The key does not have jobs:read.
404{ "error": "not_found" }: no such job in the key's project.
503The database is not configured.

On this page