Querying Job Data
Note
These endpoints are available in both
application/jsonandapplication/msgpackformats.
Zizq is designed with visibility front of mind. A number of endpoints exist that allow retrieving job data from the server without actually dequeueing the jobs.
Common Job Type
All endpoints return the same Job structure.
| Field | Description |
|---|---|
id requiredstring |
Unique time-sequenced job ID assigned by the server. |
queue requiredstring |
Arbitrary queue name to which the job is assigned |
type requiredstring |
Job type known to your application |
priority requiredint16 |
Numeric priority for the job. Lower values are processed first
(higher priority). The default value is 32768.
|
status requiredstring |
The job status on the server. One of:
|
unique_keystring |
Optional unique key for this job, which is used to protect
against duplicate job enqueues. This is paired with the
optional unique_while field which defines the
scope within which the job is considered unique.
|
unique_whilestring |
When the job has a unique key, specifies the scope within which
that job is considered unique. One of:
queued.
|
payload requiredobject |
Any JSON-serializable type to be processed by your application. |
batchobject |
Optional batched-job configuration. When present, subsequent
enqueues sharing the same batch.key are
folded into this job's pending payload via the
when and fold jq expressions,
rather than creating separate pending jobs. All three inner
fields are required when this field is set. Mutually exclusive
with unique_key — supplying both returns
400 Bad Request.
|
batch.keystring |
Identifies the batch. Only one unsealed batched job exists per key at a time. Enqueues sharing this key fold into the existing pending job (or start a new one if none exists or the existing batch was already sealed). |
batch.whenstring |
jq predicate that
decides whether an incoming enqueue folds into the existing
pending job. Evaluated with $existing bound to
the current pending payload and $new bound to
the incoming payload. Truthy means fold; falsy seals the
existing batch and starts a fresh one from the incoming
enqueue. Invalid jq syntax, or an expression that returns
multiple outputs, returns 422 Unprocessable Entity.
|
batch.foldstring |
jq expression that
produces the merged payload when a fold occurs. Runs with the
same $existing and $new bindings as
when. Must produce exactly one output; multiple
outputs return 422 Unprocessable Entity.
|
budgetsarray |
Array of budget bindings used to control concurrency and/or rate limiting of dispatched jobs. |
budgets[*].key requiredstring |
The identifier for the budget. |
budgets[*].cost requiredint32 |
The number of tokens this job takes from the budget. |
ready_at requiredint64 |
The timestamp at which this job is ready to be dequeued by workers. |
attempts requiredint32 |
The number of times this job has been previously attempted (starts at zero). |
backoffobject |
Optional backoff policy which overrides the server's default
policy. All fields are required. Zizq computes the backoff delay as
base_ms +
(attempts^exponent) +
(rand(0.0..jitter_ms)*attempts)
.
The jitter_ms mitigates retry flooding when failures
occur clustered together.
|
backoff.base_msint32 |
The minimum delay in milliseconds between job retries. |
backoff.exponentfloat |
A multiplier applied to the number of attempts on each retry,
used as pow(attempts, exponent) to produce an
increasing delay in milliseconds.
|
backoff.jitter_msint32 |
A random delay added onto each attempt. Multiplied by the total
number of attempts, such as attempts * rand(0..jitter).
Prevents retries clutering together.
|
retry_limitint32 |
Overrides the severs default retry limit for this job. Once
this limit is reached, the server marks the job dead.
|
retentionobject |
Optional retention policy for dead and
completed jobs which overrides the server's
default policy. All fields are optional.
|
retention.dead_msint64 |
The number of milliseconds for which to retain
dead jobs after all retries have been exhausted.
When not set, the server's default value (7 days) applies. When
set to zero, jobs are purged as soon as all retries have been
exhausted.
|
retention.completed_msint64 |
The number of milliseconds for which to retain
completed jobs after successful processing. When
not set, the server's default value (zero) applies. When set to
zero, jobs are purged immediately upon completion.
|
budgetsarray |
Array of budget bindings used to control concurrency and/or rate limiting of dispatched jobs. |
budgets[*].key requiredstring |
The identifier for the budget. |
budgets[*].costint32required |
The number of tokens this job takes from the budget. |
GET /queues
Get the list of all queues known to the server.
Note
Queues are not explicitly created in Zizq. Jobs are assigned to arbitrary queue names.
Responses
200 OK
| Field | Description |
|---|---|
queues requiredarray |
Array of queue names (strings). |
GET /jobs
Retrieve a filtered, paginated list of all jobs. Jobs are returned in FIFO order by default (i.e. ordered by the job ID, not necessarily prioritised).
Note
Zizq uses cursor-based pagination. Pages are enumerated by following the links in the response data
Tip
For more details on the query language used in the
?filter=parameter, read the language specification on the jaq website or on jq.
Tip
The
priority,ready_at, andattemptsparameters accept a range expression with inclusive bounds on both ends. Four shapes are supported:
Shape Meaning NExactly N(sugar forN..N).A..BBetween AandB...BAt most B.A..At least A.Requests where the lower bound exceeds the upper bound are rejected with
400 Bad Request.
Parameters
All options are additive.
| Field | Description |
|---|---|
id querystring |
Optional comma-separated list of job IDs to include. |
queue querystring |
Optional comma-separated list of queue names to include. Defaults to all queues. |
type querystring |
Optional comma-separated list of job types to include. Defaults to all types. |
status querystring |
Optional comma-separated list of job statuses to include. Defaults to all statuses. |
priority queryrange |
Optional inclusive range filter on the job's priority. Lower numbers are higher priority. |
ready_at queryrange |
Optional inclusive range filter on the job's ready_at
timestamp (milliseconds since the Unix epoch).
|
attempts queryrange |
Optional inclusive range filter on the job's failure count.
For example 0 selects jobs that have never failed,
1.. selects anything that has failed at least once.
|
budgets.key querystring |
Optional comma-separated list of budget keys to which jobs are bound. Jobs matching any of the keys are included. |
filter querystring |
Optional jq expression by which to filter jobs by
payload. This enables matching on the entire
payload, or arbitrarily on a subset of the payload. Filtering
is done via
jaq which
is compatible with jq.
|
order querystring |
Whether to return the results ordered ascending or descending
by ID. One of:
asc.
|
limit queryint16 |
The maximum number of jobs to include per page. Valid values are between 1 and 2000. The default is 50. |
Responses
200 OK
| Field | Description |
|---|---|
jobs requiredarray |
Array of jobs for a single page using the common Job type. |
pages requiredobject |
Links for the client to navigate to previous and next pages in the result. Each link is an absolute path that must be appended to the base URL. |
pages.self requiredstring |
Link to be used to retrieve the current page of jobs. |
pages.nextstring |
Link to be used to retrieve the next page of jobs if more pages exist. |
pages.prevstring |
Link to be used to retrieve the previous page of jobs if previous pages exist. |
400 Bad Request
When given invalid input parameters.
| Field | Description |
|---|---|
error requiredstring |
A description of the error. |
GET /jobs/{id}
Retrieve a single job given a known ID.
Parameters
| Field | Description |
|---|---|
id pathstring |
ID of the job to retrieve. |
Responses
200 OK
See Common Job Type.
404 Not Found
| Field | Description |
|---|---|
error requiredstring |
A description of the error. |
GET /jobs/count
Get the total number of jobs matching the given parameters.
Tip
The
priority,ready_at, andattemptsparameters accept a range expression with inclusive bounds on both ends. Four shapes are supported:
Shape Meaning NExactly N(sugar forN..N).A..BBetween AandB...BAt most B.A..At least A.Requests where the lower bound exceeds the upper bound are rejected with
400 Bad Request.
Parameters
All options are additive.
| Field | Description |
|---|---|
id querystring |
Optional comma-separated list of job IDs to include. |
queue querystring |
Optional comma-separated list of queue names to include. Defaults to all queues. |
type querystring |
Optional comma-separated list of job types to include. Defaults to all types. |
status querystring |
Optional comma-separated list of job statuses to include. Defaults to all statuses. |
priority queryrange |
Optional inclusive range filter on the job's priority. Lower numbers are higher priority. |
ready_at queryrange |
Optional inclusive range filter on the job's ready_at
timestamp (milliseconds since the Unix epoch).
|
attempts queryrange |
Optional inclusive range filter on the job's failure count.
For example 0 selects jobs that have never failed,
1.. selects anything that has failed at least once.
|
budgets.key querystring |
Optional comma-separated list of budget keys to which jobs are bound. Jobs matching any of the keys are included. |
filter querystring |
Optional jq expression by which to filter jobs by
payload. This enables matching on the entire
payload, or arbitrarily on a subset of the payload. Filtering
is done via
jaq which
is compatible with jq.
|
Responses
200 OK
| Field | Description |
|---|---|
count requiredint64 |
The number of jobs that were matched. |
400 Bad Request
When given invalid input parameters.
| Field | Description |
|---|---|
error requiredstring |
A description of the error. |
GET /jobs/{id}/errors
Retrieve a paginated list of errors for a known job in order of attempt.
Note
Zizq uses cursor-based pagination. Pages are enumerated by following the links in the response data
Parameters
| Field | Description |
|---|---|
id pathstring |
ID of the job for which to retrieve errors. |
Responses
200 OK
| Field | Description |
|---|---|
errors requiredarray |
Array of error objects for this page. |
errors[*].attempt requiredint32 |
The attempt number of the job that failed. |
errors[*].message requiredstring |
The error message sent by the client when the job failed. |
errors[*].error_typestring |
The error type sent by the client when the job failed. |
errors[*].backtracestring |
The backtrace associated with the error, if specified by the client. |
errors[*].dequeued_at requiredint64 |
The timestamp at which the failing job was dequeued by the worker. |
errors[*].failed_at requiredint64 |
The timestamp at which the job failed. |
pages requiredobject |
Links for the client to navigate to previous and next pages in the result. Each link is an absolute path that must be appended to the base URL. |
pages.self requiredstring |
Link to be used to retrieve the current page of errors. |
pages.nextstring |
Link to be used to retrieve the next page of errors if more pages exist. |
pages.prevstring |
Link to be used to retrieve the previous page of errors if previous pages exist. |
400 Bad Request
When given invalid input parameters.
| Field | Description |
|---|---|
error requiredstring |
A description of the error. |
404 Not Found
When the specified job does not exist.
| Field | Description |
|---|---|
error requiredstring |
A description of the error. |
GET /jobs/{id}/errors/{attempt}
Retrieve a specific error for a known job and attempt.
Parameters
| Field | Description |
|---|---|
id pathstring |
ID of the job for which to retrieve errors. |
attempt pathint32 |
The attempt number of the job that failed. |
Responses
200 OK
| Field | Description |
|---|---|
attempt requiredint32 |
The attempt number of the job that failed. |
message requiredstring |
The error message sent by the client when the job failed. |
error_typestring |
The error type sent by the client when the job failed. |
backtracestring |
The backtrace associated with the error, if specified by the client. |
dequeued_at requiredint64 |
The timestamp at which the failing job was dequeued by the worker. |
failed_at requiredint64 |
The timestamp at which the job failed. |
400 Bad Request
When given invalid input parameters.
| Field | Description |
|---|---|
error requiredstring |
A description of the error. |
404 Not Found
When the specified job or error does not exist.
| Field | Description |
|---|---|
error requiredstring |
A description of the error. |
Examples
List all queues
Request:
http 127.0.0.1:7890/queues
Response:
HTTP/1.1 200 OK content-length: 22 content-type: application/json date: Fri, 03 Apr 2026 11:07:43 GMT{ "queues": [ "comms", "default", "example", "payments" ] }
List ready jobs on a specific queue
Request:
http GET "http://127.0.0.1:7890/jobs?queue=example&status=ready&limit=2"
Response:
HTTP/1.1 200 OK content-length: 584 content-type: application/json date: Fri, 03 Apr 2026 11:00:17 GMT{ "jobs": [ { "attempts": 0, "id": "03fvmaj8q5po1huy5nd4xmi5f", "payload": { "greet": "World" }, "priority": 500, "queue": "example", "ready_at": 1775213710452, "status": "ready", "type": "hello_world" }, { "attempts": 0, "id": "03fvmame0wyuiexbc2033jby2", "payload": { "greet": "World" }, "priority": 500, "queue": "example", "ready_at": 1775213737304, "status": "ready", "type": "hello_world", "unique_key": "hello_world:world", "unique_while": "queued" } ], "pages": { "next": "/jobs?from=03fvmame0wyuiexbc2033jby2&order=asc&limit=2&status=ready&queue=example", "prev": null, "self": "/jobs?order=asc&limit=2&status=ready&queue=example" } }
Filter jobs by payload content
Note
The following example is intentionally not correctly percent-encoded for readability. HTTPie handles this ok.
Request:
http GET 'http://127.0.0.1:7890/jobs?filter=.greet | startswith("Uni")'
Response:
HTTP/1.1 200 OK content-length: 301 content-type: application/json date: Fri, 03 Apr 2026 11:02:51 GMT{ "jobs": [ { "attempts": 0, "id": "03fvmbsuryhdkxvb6vjy4qhxp", "payload": { "greet": "Universe" }, "priority": 500, "queue": "example", "ready_at": 1775214099613, "status": "ready", "type": "hello_world" } ], "pages": { "next": null, "prev": null, "self": "/jobs?order=asc&limit=50&filter=.greet%20%7C%20startswith%28%22Uni%22%29" } }