GoRunner docs
Search or askSearch⌘K

Runs in flight

GET/api/stats

The runs of your workspace that haven’t finished yet, by state. It takes no parameters.

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

Response

runs counts the runs that haven’t finished: pending (queued), running and paused. Every key is always there, zero included.

waiting is the pending runs that wait in line for a free slot. They are counted in pending too, so don’t add waiting to the others.

The answer also holds queue and keel, always {"available": false}. They are leaving: don’t read them. The installation’s queue depths are on the Health page of the Platform console, for its admins.

For figures by day, or under the Runs page’s filters, use Count runs by state.

Request

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

curl "$GORUNNER/api/stats" \
  -H "Authorization: Bearer $GORUNNER_TOKEN"

Response · 200 OK

json
{
  "data": {
    "runs": {
      "pending": 0,
      "running": 0,
      "paused": 0,
      "waiting": 0
    }
  }
}

Responses

  • 200OK

    The workspace’s runs in flight.

  • 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 · 429 RATE_LIMITED · 503 PAUSED · 503 SERVICE_UNAVAILABLE. See Errors.

Every field

It takes no body.

Response · 200 OK

dataobject

The caller’s workspace’s in-flight run counts.

runsobject

Non-terminal runs in the caller’s workspace. All four keys are always present.

pendinginteger

Not finished and not paused: waiting in line or executing (includes waiting).

waitinginteger

Of pending, the runs waiting in line for a free slot (a runs-at-once limit or a free worker).

runninginteger

Currently executing.

pausedinteger

Suspended on a durable wait.

queueobject

Always {"available": false}. Kept for one release for dashboards loaded before it; it will be removed.

availableboolean
keelobject

Always {"available": false}. Kept for one release for dashboards loaded before it; it will be removed.

availableboolean