GoRunner

In-flight run counts and queue depth

Requires scope run:read
GET
/api/stats

The "is the system backed up?" glance. Takes no parameters.

Two different scopes in one response, which is easy to misread:

  • runs counts non-terminal runs in the CALLER'S WORKSPACE — pending (queued, not yet picked up), running, paused. Terminal runs are never counted; the three keys are always present, zero included.
  • queue and keel are INSTANCE-WIDE Redis queue depths, not workspace-scoped: waiting (jobs queued), processing (claimed by a worker), dead (dead-lettered after redelivery). queue is the workflow-run lane; keel is the AI-assistant chat lane.

When the queue cannot be read (Redis unreachable, or the instance has no queue wired) the block degrades to {"available": false} with the three counters ABSENT — deliberately, rather than reporting misleading zeros. Always check available before reading the counters.

Authorization

bearerAuth
AuthorizationBearer <token>

An API token: Authorization: Bearer grt_…. Mint one in the app under Settings → Workspace → API tokens; the raw value is shown once. Scopes confine the token — see x-permission on each operation.

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/stats"
{  "data": {    "runs": {      "pending": 0,      "running": 0,      "paused": 0    },    "queue": {      "available": true,      "waiting": 0,      "processing": 0,      "dead": 0    },    "keel": {      "available": true,      "waiting": 0,      "processing": 0,      "dead": 0    }  }}