---
title: "Count jobs by status and type"
method: GET
path: "/api/v1/jobs/counts"
tags: ["Job Management"]
---

# Count jobs by status and type

`GET /api/v1/jobs/counts`

## Request

- Base URL: `https://api.imagestep.dev`
- URL: `https://api.imagestep.dev/api/v1/jobs/counts`
- Auth: API key in header `Authorization`

How many of your jobs are in each status and of each type, as one table: a row per status and
type that has any, with its count. Takes the filters GET /api/v1/jobs takes, except status and
type — those are the table's two dimensions — and every cell is the `meta.total` that listing
would report for that status and type.

To count by status alone, sum the rows for each status; to count the statuses within one type,
keep that type's rows first.

USE THIS WHEN:
- Checking how many jobs failed, or are still running, without paging through them
- Showing a count beside each status or type filter

DO NOT USE WHEN:
- You need the jobs themselves → use GET /api/v1/jobs
- You need credits spent → use GET /api/v1/usage

## Query parameters

- `preset` string
- `op` string
- `rootJobId` string
- `createdFrom` string
- `createdTo` string

## Response `200`

The non-zero cells; an empty list when nothing matches

## Other responses

- `400`: `invalid_param` on `createdFrom` / `createdTo` — neither epoch milliseconds nor an ISO-8601 date or instant
- `404`: `preset_not_found` — the `preset` filter names no preset of yours, or no such version of it
- `429`: Rate limited — `error.code` is `rate_limited` and `retryable` is true. `Retry-After` says how many seconds to wait.

---

[API](https://skmtc.dev/imagestep/apis/imagestep-api.md) · [All operations](https://skmtc.dev/imagestep/apis/imagestep-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imagestep/apis/imagestep-api/revisions/5e8e922a3085?raw)
