curl and jq: count Sume jobs by status in one command
GET /v1/jobs with limit=100 piped into jq group_by prints how many jobs are queued, processing, failed and so on, and warns when next_cursor says more.

Pipe GET /v1/jobs?limit=100&scope=workspace into jq and group the data.jobs array on status. The list returns up to 100 jobs a page, each with one of five statuses, so a single command shows how many are queued, processing, completed, failed or canceled. The third line of the script prints a warning when the response carries next_cursor, which means more pages remain.
What the list call accepts
The parameters below come from Sume's OpenAPI spec. The response is data.jobs[] plus data.next_cursor, which is absent on the last page and which you pass back as starting_after. Do not build a cursor from the last job's id.
| Parameter | Values | Use |
|---|---|---|
| limit | 1 to 100 | Page size |
| scope | thread or workspace | Which jobs to read |
| status | queued, processing, completed, failed, canceled | Filter server-side |
| type | a job type | Filter by product |
| starting_after | a next_cursor value | Next page |
The command
Set SUME_API_KEY and run it. It prints one tab-separated line per status.
To count a single status without grouping, add &status=queued to the URL and read .data.jobs | length.
curl -s "https://api.sume.com/v1/jobs?limit=100&scope=workspace" \
-H "Authorization: Bearer $SUME_API_KEY" \
| jq -r '(.data.jobs | group_by(.status) | map("\(.[0].status)\t\(length)") | .[]),
(if .data.next_cursor then "more pages: starting_after=\(.data.next_cursor)" else empty end)'What the counts do not mean
An API key reads only the jobs its own member created, and other jobs return 404, so the counts describe your key's member, not the whole workspace, even with scope=workspace. The counts cover one page. Over 100 jobs, loop on next_cursor or filter by status.
The numbers are a snapshot. A job can move from queued to processing between two calls. Use them to eyeball a backlog, and use generation_limits in a submit response when you need admission headroom.
Sources
Related posts
More in Developers
- Cursor project .cursor/mcp.json or global ~/.cursor/mcp.json for Sume?
Put a URL-only Sume entry in .cursor/mcp.json to share it with a repo, and keep any API key in an env variable in the global file, not in git.
- Cut hold music from a call recording before STT: one concat job
Drop a hold-music stretch with one Sume timeline audio concat job that reuses the file twice via source_in and duration, then send the result to STT.
- Sume default queue capacity: max(3, 5 x concurrency), checked per plan
Sume's default queue capacity is max(3, concurrency x 5). Checking the rule against Free, Pro, Startup and Scale, plus the org floor and the wave hint.
- Deno: time out a Sume video submit, then retry with the same key
A fetch that times out may still have created a job. A 20-line Deno submit retries only 408, 429, 5xx and timeouts, always with one Idempotency-Key.
Written by Sume