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.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Counts for the type and status pairs present in the jobs table.
Counts grouped by stored job type and status.
object
Existing type and status pairs, sorted by type then status. Pairs with no jobs are left out. Empty when there are no stored jobs.
Number of stored jobs sharing one type and status.
object
Stored job type, whether or not a handler is registered in this process.
Stored queue status for this group.
Rows with this exact type and status at query time. This is not a lifetime total.
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"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completed