Get a job
GET /jobs/{id}
Returns a job’s full record: its payload, status, attempts, claim and lease, result and last error. Use it to follow a job you started or one you’re working on.
Any signed-in account can read any job by its id; nothing checks who queued it. The payload and result can hold the details of the request behind the job, such as a prompt or an asset id.
A cleanup that runs about every hour deletes jobs completed more than 7 days ago (by default), so a 404 can mean the job is gone as well as unknown.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The job’s id.
Responses
Section titled “ Responses ”The job.
object
Example
preview.rasterThe job’s input, as queued. Its shape depends on type.
object
Where the job is: pending (waiting to be claimed), running (claimed), done, failed, or cancelled by an administrator.
Lower numbers are claimed first; 100 is normal.
How many times the job has been claimed since it was queued, or since an administrator last requeued it, which resets the count.
The job isn’t offered again once attempts reaches this number, unless an administrator requeues it.
The worker_id of the claim that holds the job, or that completed it. Left out while the job is waiting.
When that claim was made.
When the lease runs out. A completed job keeps its last value, and a running job can show a time in the past until the server puts it back on the queue.
The error from the last POST /jobs/{id}/fail, with [lease expired] added each time the server’s watchdog put the job back on the queue after its lease ran out. Cleared when the job completes.
What the worker sent when it completed the job. Left out until then, or if it sent nothing.
object
The earliest time the job can be claimed. It stays after that time has passed, and it’s left out when none was set. It isn’t a deadline.
When the job was first claimed. Later attempts don’t change it.
When the job became done, failed or cancelled. A failure that puts the job back on the queue clears it.
Authentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Resource not found
object
Human-readable error summary
Example
the request could not be completed