Skip to content

Retrieve a single job by ID.

GET
/v1/jobs/{id}
id
required
string

ULID assigned by the queue at enqueue time

Job details

A single background-queue job, projected from its pg_loco_queue row.

object
created_at
required
string format: date-time
duration_seconds

Wall-clock seconds from enqueue (created_at) to terminal state (updated_at); None for in-flight rows. Includes queue wait, since Loco doesn’t preserve a worker-start timestamp for one-shot jobs.

integer | null format: int64
error_message

Failure reason — Loco merges {"error": msg} into task_data when a worker returns Err. None for non-failed jobs.

string | null
id
required

ULID assigned by Loco at enqueue time.

string
integration_type

Integration type from task_data.integration_type, when present.

string | null
name
required

Worker class name (e.g. RiskIntegrationImporter).

string
run_at
required

Loco’s run_at: the enqueue time, except that Loco overwrites it to the completion instant when a one-shot job completes (see complete_job in loco_rs::bgworker::pg). So it is not “when the worker started” — duration_seconds is derived from created_at instead.

string format: date-time
status
required

Public job status — matches the five values Loco’s queue ever writes.

string
Allowed values: queued processing completed failed cancelled
updated_at
required
string format: date-time

Job not found