---
title: "Health File Trend"
method: GET
path: "/snapshots/{snapshot_id}/health/files/{file_path}/trend"
tags: ["code-health"]
---

# Health File Trend

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

## Request

- Base URL: `https://api.repowise.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.repowise.dev/snapshots/{snapshot_id}/health/files/{file_path}/trend`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/repowise/apis/repowise-hosted-api/docs/snapshots/:snapshot_id/health/files/:file_path/trend/get.ts> (a function with typed inputs; its response is checked against the schema)

Per-file health score over time.

Assembled from the ``per_file_scores`` map persisted on each snapshot's
``health_snapshots.json``. With a single index the series carries one point;
it fills in as more snapshots accrue.

Each point also carries ``unclamped_score``: the score clamps at
``SCORE_FLOOR``, so a file deep enough to sit on the floor draws a flat line
no matter how much worse it gets, and the movement the chart exists to show
is exactly the movement the clamp destroys. It equals ``score`` unless every
point in the window recorded a depth — see ``file_score_series``.

## Path parameters

- `snapshot_id` string, required
- `file_path` string, required: repo-relative file path

## Response `200`

Successful Response

- object

## 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/3037f631a606?raw)
