Zum Inhalt springen

Retry a failed job

POST
/api/v1/jobs/{job_id}/retry
curl --request POST \
--url https://example.com/api/v1/jobs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/retry \
--header 'X-Label-Hub-Key: <X-Label-Hub-Key>'

Clones a failed (or failed_restart / cancelled) job into a new queued job with a fresh UUID. The original job is untouched and remains as an immutable history entry. The new job is handed to the print queue immediately — no restart needed. Returns 409 when the original job is still in an active state (queued or printing) or its printer is not available, and 422 when the stored payload cannot be re-rendered (e.g. webhook-created jobs). Page jobs: a calibration page is re-submitted from its payload, so retry prints the same page again with its original calibration snapshot and date; a fresh check print with the current calibration is a new calibration-page request. A sheet page is retried onto the same cells of the same sheet as a new job, with a fresh calibration snapshot and the margin ID and feed mark decided again for the printer. It answers 409 job_not_retryable for a done job (or an ID-only job whose ID was printed since), 409 cells_unconfirmed while a cell of the job waits for confirmation, 409 cells_taken (with the cell numbers) when a cell is no longer free, 409 printer_disabled for a disabled printer (a calibration page too), 422 tray_unknown when the tray was removed or disabled since, and 409 sheet_discarded for a discarded sheet; nothing is reserved or created in any of these cases.

job_id
required
Job Id
string format: uuid

Successful Response

Media typeapplication/json
JobRead

Serialised view of a Job DB row.

object
created_at
required
Created At
string
error
required
Error
Any of:
string
finished_at
required
Finished At
Any of:
string
id
required
Id
string format: uuid
payload
required
Payload
object
key
additional properties
any
printer_id
required
Printer Id
string format: uuid
result
required
Result
Any of:
object
key
additional properties
any
started_at
required
Started At
Any of:
string
state
required
State
string
template_key
required
Template Key
Any of:
string
updated_at
required
Updated At
string

Example generated

{
"created_at": "example",
"error": "example",
"finished_at": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"payload": {},
"printer_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"result": {},
"started_at": "example",
"state": "example",
"template_key": "example",
"updated_at": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}