---
title: "Get Decision Counts"
method: GET
path: "/snapshots/{snapshot_id}/decisions/counts"
tags: ["dashboard"]
---

# Get Decision Counts

`GET /snapshots/{snapshot_id}/decisions/counts`

Counts by status over the whole artifact, zero-filled.

Declared above the parameterised routes on purpose. FastAPI matches in
declaration order, so a literal sub-path below ``/{decision_index}`` would
be swallowed by it and "counts" looked up as a decision index. There is no
``GET /{decision_index}`` on this router today, so nothing collides yet —
declaring it here is what keeps that true when one is added.

A missing decisions artifact 404s exactly as the list endpoint does, rather
than reporting zeros. Zero recorded decisions and no decisions layer are
different facts, and only one of them is worth printing as a number. The
page is what degrades: it treats an unavailable count as unknown and says
what it actually loaded instead, so a frontend running ahead of its backend
renders the table rather than "Page not found".

## Path parameters

- `snapshot_id` string, required

## Query parameters

- `source` string, nullable — Filter by source
- `include_proposed` boolean

## Response `200`

Successful Response

- DecisionCountsResponse — Grouped counts by status, zero-filled so the shape is stable. A count over the whole artifact rather than over a page of rows. Counting what a page had fetched reported "97 of 100" on a repository holding several hundred records — a denominator nobody measured, on the surface whose whole job is to be trusted.
  - `total` integer
  - `active` integer
  - `proposed` integer
  - `superseded` integer
  - `deprecated` integer

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/repowise/apis/repowise-hosted-api.md) · [All operations](https://skmtc.dev/repowise/apis/repowise-hosted-api/llms.txt) · [OpenAPI document](https://skmtc.dev/repowise/apis/repowise-hosted-api/revisions/491affc1d3e7?raw)
