Skip to content

Count jobs by type and status

GET
/admin/jobs/status-counts

Returns the number of stored jobs for each type and status.

You need to be signed in with system.jobs.read or system.admin for the whole install; a permission held only for a team doesn’t count.

There’s one row for each (type, status) pair that exists in the jobs table, sorted by type and then status. Pairs with no jobs are left out rather than returned as zero, and with no jobs at all items is empty. A type can appear even when the current process has no handler registered for it.

This is an unpaginated database query, not a lifetime count of work ever attempted or completed. Retention cleanup and state changes affect later answers. Separate calls to the queue, worker and count endpoints needn’t agree while jobs are changing. Poll for updates; this endpoint doesn’t offer a server-sent-events stream.

Counts for the type and status pairs present in the jobs table.

Counts grouped by stored job type and status.

object
items
required

Existing type and status pairs, sorted by type then status. Pairs with no jobs are left out. Empty when there are no stored jobs.

Array<object>

Number of stored jobs sharing one type and status.

object
type
required

Stored job type, whether or not a handler is registered in this process.

string
status
required

Stored queue status for this group.

string
count
required

Rows with this exact type and status at query time. This is not a lifetime total.

integer format: int64

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Authenticated but missing required capabilities

object
error
required

Human-readable error summary

string
Example
the request could not be completed