---
title: "Health Files"
method: GET
path: "/snapshots/{snapshot_id}/health/files"
tags: ["code-health"]
---

# Health Files

`GET /snapshots/{snapshot_id}/health/files`

## Path parameters

- `snapshot_id` string, required

## Query parameters

- `filter` string, nullable — hotspots | below_green | untested | failing
- `sort` string — score | nloc | path
- `q` string, nullable — path substring search
- `limit` integer
- `offset` integer
- `scope` string
- `counts` string

## Response `200`

Successful Response

- HealthFilesResponse — A page of per-file metrics plus the true pre-slice count. Mirrors the OSS ``/health/files`` envelope so the shared code-health UI can label the map with the repository's real file count instead of the size of the page it happened to receive.
  - `total` integer
  - `offset` integer
  - `limit` integer
  - `files` HealthFileMetric[]
    - `file_path` string, required
    - `score` number, required
    - `band` 'excellent' | 'good' | 'fair' | 'needs_work' | 'at_risk', nullable
    - `max_ccn` integer
    - `max_nesting` integer
    - `nloc` integer
    - `duplication_pct` number, nullable
    - `has_test_file` boolean
    - `line_coverage_pct` number, nullable
    - `branch_coverage_pct` number, nullable
    - `module` string, nullable
    - `defect_score` number, nullable
    - `maintainability_score` number, nullable
    - `performance_score` number, nullable
    - `structure_deduction` number, nullable
    - `history_deduction` number, nullable
    - `unclamped_score` number, nullable
    - `performance_findings` integer
    - `performance_analyzed` boolean, nullable
    - `primary_biomarker` string, nullable
    - `primary_reason` string, nullable
    - `total_deduction` number, nullable
    - `top_biomarkers` BiomarkerFinding[]
      - `id` string, required
      - `biomarker_type` string, required
      - `severity` string, required
      - `file_path` string, required
      - `function_name` string, nullable
      - `line_start` integer, nullable
      - `line_end` integer, nullable
      - `details` object
      - `health_impact` number
      - `reason` string
      - `status` string
      - `suggestion` string, nullable
      - `dimension` string
      - `symbol_id` string, nullable
      - `is_test` boolean
    - `is_test` boolean

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-14** `c3d46dfc6e3d` — 5 warning, 5 info
  - added the new `at_risk` enum value to the `files/items/band/anyOf[subschema #1]/` response property for the response status `200`
  - added the new `excellent` enum value to the `files/items/band/anyOf[subschema #1]/` response property for the response status `200`
  - added the new `fair` enum value to the `files/items/band/anyOf[subschema #1]/` response property for the response status `200`
  - added the new `good` enum value to the `files/items/band/anyOf[subschema #1]/` response property for the response status `200`
  - …6 more

[Change history](https://skmtc.dev/repowise/apis/repowise-hosted-api/changes/snapshots/:snapshot_id/health/files/get.md)

---

[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)
