---
title: "Get Commit Stats"
method: GET
path: "/snapshots/{snapshot_id}/commits/stats"
tags: ["git"]
---

# Get Commit Stats

`GET /snapshots/{snapshot_id}/commits/stats`

Repo-wide commit stat cards: total commits, high-priority (top
repo-relative risk tercile) count, fix commits, agent commits, and average
change entropy. Computed over the whole `git_commits.json` feed so the
headline cards don't under-count off a paged list.

Declared before ``/commits/{sha}`` so the literal path wins over the
SHA wildcard.

## Path parameters

- `snapshot_id` string, required

## Response `200`

Successful Response

- CommitStatsResponse — Repo-wide commit stat cards (repowise >= 0.22.0). Server-side aggregates so the headline numbers don't under-count off a paged commit list.
  - `total_commits` integer
  - `high_priority_count` integer
  - `fix_commit_count` integer
  - `agent_commit_count` integer
  - `avg_entropy` number
  - `risk_histogram` RiskHistogramBucket[]
    - `start` number, required
    - `end` number, required
    - `count` integer, required
  - `moderate_cut` number, nullable
  - `high_cut` number, nullable

## 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/98c833b3480d?raw)
