Skip to content

Per-activity run counts for the reports chips

GET
/api/solutions/runs/counts/
curl --request GET \
--url http://localhost:8000/api/solutions/runs/counts/ \
--header 'Authorization: Bearer <token>'

Per-activity run counts for the reports catalog’s activity chips (#1192), mirroring /sessions/counts/. Counts the team’s runs in the current view grouped by each Solution’s headline activity; the activity filter itself is not applied (a chip never zeroes its own count). ?archived=true counts the archived view instead of active.

archived
boolean

true counts archived runs instead of active.

client
string format: uuid

Scope the counts to one client’s reports lens (client id) — so the Active/Archived toggle matches that client’s list.

from
string

Created-at range start (inclusive, YYYY-MM-DD, viewer-local via tz).

solution
string

Scope the counts to one Solution’s reports lens (slug) — so the Active/Archived toggle matches that Solution’s list.

to
string

Created-at range end (inclusive, YYYY-MM-DD, viewer-local via tz).

tz
string

IANA timezone for the from/to day boundaries (default UTC).

Media typeapplication/json

GET /api/solutions/runs/counts/ — per-activity run counts for the reports catalog’s activity chips (#1192). {activity_counts: {activity: n}}; only present activities (>0) are returned.

object
activity_counts
required

Session-activity key → run count (e.g. {running: 6}).

object
key
additional properties
integer
Examplegenerated
{
"activity_counts": {
"additionalProperty": 1
}
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examplegenerated
{
"detail": "example"
}