---
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 | untested | failing
- `sort` string — score | nloc | path
- `q` string, nullable — path substring search
- `limit` integer
- `offset` integer

## 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` string, 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
    - `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

---

[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/ab200f4d1489?raw)
