Skip to content

Background Jobs

3 endpoints.

DELETEhttp://localhost:3000/api/jobs

Removes jobs that have reached a terminal state — finished or failed. Jobs still in flight (queued, active) are left tracked; use the single-job endpoint once they settle.

Only state=finished is accepted. The name means “any terminal-state job”, which is why failed jobs are swept up too.

Query parameters

statestring · enum: finishedrequired
Only finished is accepted; a missing or different value is a 400.

Responses

200How many jobs were cleared.
null
400`state` was missing, or was something other than `finished`.
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

GEThttp://localhost:3000/api/jobs

Every job this instance is tracking, most recently created first.

Progress and byte counts are best-effort: a job that cannot report granular progress jumps straight from 0 to 1 rather than reporting a fabricated intermediate value, and the byte fields are genuinely absent (not 0) for jobs that have no transfer to report.

Responses

200The current job list.
{
  "jobs": [
    {
      "downloaded_bytes": null,
      "error": null,
      "finished_at": null,
      "id": null,
      "name": null,
      "progress": null,
      "rate_limit_bytes_per_sec": null,
      "rate_limit_matched_pattern": null,
      "result": null,
      "result_truncated": null,
      "started_at": null,
      "state": null,
      "total_bytes": null
    }
  ]
}

Your own instance address. Requests go from this browser straight to it.

DELETEhttp://localhost:3000/api/jobs/{id}

Clears a single job by ID, and only once it has reached a terminal state.

A job that is still queued or active is a 409 rather than being silently killed — a job that reports success while its work is still running would be worse than an error.

Path parameters

idstringrequired

Responses

200Cleared.
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}
404No job with that ID is tracked.
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}
409The job is still queued or active; wait for it to finish or fail first.
{
  "error": "",
  "operation": "",
  "success": 0,
  "successMessage": ""
}

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.