GoRunner docs
Search or askSearch⌘K

Count runs by state

Since v2026.10.8

GET/api/runs/counts

Counts runs by state under the filters of List runs: in the range, open now, today, and by day.

Needs an API token with the Read permission for runs (run:read).

Parameters

Query

workflowIdOptional · UUID

One workflow’s runs.

environmentOptional · string

production (the default), test or all.

windowOptional · string

24h, 7d, 30d, 90d or all (the default). Not with from or to.

tzOptional · string

A time zone name, such as Europe/Berlin, for “today” and the days. Unknown or left out: UTC.

daysOptional · boolean

true adds days: each local day’s counts, newest first, 92 at most.

What are the rarely used parameters?
triggerTypeOptional · string

How it began: manual, webhook, cron, poll, error, run_finished, event, api, mcp or subflow.

tagOptional · string

Runs with exactly this tag, added by the Tags app.

fromOptional · time

Runs started at or after this time (RFC 3339).

toOptional · time

Runs started before this time. After from.

qOptional · string

Up to 200 characters. Finds runs whose ID starts with it, or whose workflow name or error has it, ignoring case.

reasonOptional · string

Up to 200 characters. Runs whose error has it, ignoring case.

groupOptional · string

A failure group’s key, from Group failed runs.

Read it

worked, failed and cancelled count the range. held, running and queued count what is open now, however old.

failedWorkedOnRetry is the failed runs a retry made good; they still count in failed. failedTests appears only for production, counting failed test runs.

retentionDays is how long a finished run is kept, apart from each workflow’s newest finished run in each environment; 0 means forever. It takes no state, status or paging.

Responses

  • 200OK

    The counts.

  • A filter has a value it doesn’t take. The message names it.

  • The token lacks the Read permission for runs.

  • The counts couldn’t be read. Try again.

Any call can also answer: 401 UNAUTHORIZED · 401 TOKEN_ENDED · 403 TOKEN_SURFACE_OFF · 403 FEATURE_OFF · 403 EMBED_NOT_ALLOWED · 403 EMBED_NOT_AVAILABLE · 403 ACCOUNT_SUSPENDED · 429 RATE_LIMITED · 503 BUSY · 503 PAUSED · 503 SERVICE_UNAVAILABLE. See Errors.

Request

GORUNNER="https://api.gorunner.io"
GORUNNER_TOKEN="grt_…"  # needs Read for runs

URL="$GORUNNER/api/runs/counts?window=7d&tz=Europe/"
URL="${URL}Berlin"
curl "$URL" \
  -H "Authorization: Bearer $GORUNNER_TOKEN"

Response · 200 OK

json
{
  "data": {
    "all": 120,
    "worked": 108,
    "failed": 10,
    "cancelled": 2,
    "held": 1,
    "running": 2,
    "queued": 0,
    "failedWorkedOnRetry": 4,
    "failedTests": 3,
    "today": {
      "all": 15,
      "worked": 14,
      "failed": 1,
      "cancelled": 0,
      "from": "2026-10-25T00:00:00+02:00"
    },
    "latest": {
      "id": "8f0c41d2-6b7e-4c1a-9d3f-2a5b7c9e1f04",
      "workflowId": "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31",
      "workflowName": "Order intake",
      "startedAt": "2026-10-25T08:59:58Z",
      "state": "worked"
    },
    "range": {
      "from": "2026-10-18T11:00:00Z",
      "to": null
    },
    "retentionDays": 30,
    "tz": "Europe/Berlin"
  }
}
Every field

It takes no body.

Response · 200 OK

dataobject

The counts read: every figure the Runs page shows, under the list’s filters.

allinteger

Runs that started in the range, every state.

workedinteger

In the range.

failedinteger

In the range.

cancelledinteger

In the range.

heldinteger

Held on a person now, whatever their age.

runninginteger

Running now (a Delay included), whatever their age.

queuedinteger

Waiting in the run line now, whatever their age.

failedWorkedOnRetryinteger

Of failed, those a retry made good (they still count in failed).

failedTestsinteger

Only when environment is production: failed test runs in the range under the same filters.

todayobject

Runs that started since local midnight in tz, whatever the range.

allinteger
workedinteger
failedinteger
cancelledinteger
fromtime
latestobject or null

The newest run under the filters, in the range or open.

idUUID
workflowIdUUID
workflowNamestring
startedAttime
statestring

One of failed, held, running, queued, worked, cancelled.

rangeobject
fromtime or null
totime or null
retentionDaysinteger

RUN_RETENTION_DAYS: 0 = runs are kept for ever. Past it a finished run is deleted, except each workflow’s newest finished run per environment.

tzstring

The zone the days were counted in (UTC when absent or unknown).

daysarray of objects

Only with days=true: each local day with runs in the range (days without runs are left out), newest first, at most 92, counting that day’s runs in the range: the range’s first and last days are often a part of a day (a 7-day window starts at this time 7 days ago), and count that part only; from is the day’s own start.

allinteger
workedinteger
failedinteger
cancelledinteger
daystring
fromtime
heldinteger
runninginteger
queuedinteger