Per-activity run counts for the reports chips
const url = 'http://localhost:8000/api/solutions/runs/counts/';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”true counts archived runs instead of active.
Scope the counts to one client’s reports lens (client id) — so the Active/Archived toggle matches that client’s list.
Created-at range start (inclusive, YYYY-MM-DD, viewer-local via tz).
Scope the counts to one Solution’s reports lens (slug) — so the Active/Archived toggle matches that Solution’s list.
Created-at range end (inclusive, YYYY-MM-DD, viewer-local via tz).
IANA timezone for the from/to day boundaries (default UTC).
Responses
Section titled “Responses”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
Session-activity key → run count (e.g. {running: 6}).
object
Examplegenerated
{ "activity_counts": { "additionalProperty": 1 }}object
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).
Examplegenerated
{ "detail": "example"}