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

# Files Index

`GET /snapshots/{snapshot_id}/files`

Slim per-file rows for the browsable Files index + treemap.

One row per indexed file node, joined in-memory from the artifacts the
indexer already uploads (graph nodes, graph metrics, health metrics, git
metadata). Importance (pagerank) percentiles are computed once over the
full set — before any ``limit``/``offset`` slice, whose window is applied
last (``totals`` always reflects the full pre-slice set). Returns
``state='not_available'`` when the snapshot has no graph artifact
(pre-graph index) so the page renders an honest empty state.

## Path parameters

- `snapshot_id` string, required

## Query parameters

- `limit` integer, nullable — Rows returned; omit for the full list (treemap default)
- `offset` integer — Rows to skip (with limit)

## Response `200`

Successful Response

- FilesIndexResponse
  - `files` FileRow[]
    - `file_path` string, required
    - `language` string
    - `loc` integer, nullable
    - `symbol_count` integer
    - `pagerank_pct` number
    - `in_degree` integer
    - `out_degree` integer
    - `defect_score` number, nullable
    - `maintainability_score` number, nullable
    - `performance_score` number, nullable
    - `churn_pct` number, nullable
    - `commit_count` integer, nullable
    - `last_commit_at` string, nullable
    - `coverage_pct` number, nullable
    - `is_test` boolean
    - `is_entry_point` boolean
    - `community_id` integer, nullable
  - `language_counts` object
  - `totals` object
  - `state` string
  - `reason` string, 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-service-production.skmtc.workers.dev/v1/apis/repowise/repowise-hosted-api/revisions/40167ba9ab58/schema)
