---
title: "List Code Occurrences Files"
method: GET
path: "/v1/projects/{project_id}/code-occurrences/files"
tags: ["code-occurrences"]
---

# List Code Occurrences Files

`GET /v1/projects/{project_id}/code-occurrences/files`

## Request

- Base URL: `https://api.sonenta.dev`
- URL: `https://api.sonenta.dev/v1/projects/{project_id}/code-occurrences/files`
- Auth: none declared

Per-FILE rollup of key usages — the 'par fichier' view (Viewer+).

One row per file with the keys referenced in it: `{key_uuid, name, namespace,
occurrence_count}`. `measured=false` means no run has completed here — an empty
tree is 'never scanned', not 'no usages'.

## Path parameters

- `project_id` string, required

## Query parameters

- `status` string: present = current coverage (default) · gone = files a key left.
- `limit` integer
- `offset` integer

## Response `200`

Successful Response

- CodeOccurrencesFilesPage
  - `items` CodeOccurrencesFileRow[], required
    - `file` string, required
    - `key_count` integer, required
    - `keys` CodeOccurrencesKeyRef[], required
      - `key_uuid` string, required: Stable join key — pair with listTranslations, never the name.
      - `name` string, nullable
      - `namespace` string, nullable: Namespace slug.
      - `occurrence_count` integer, required
  - `total` integer, required: Distinct file count (for paging the tree).
  - `limit` integer, required
  - `offset` integer, required
  - `status` string, required
  - `latest_scan_id` string, nullable: scan_id of the most recent completed run; null if none.
  - `measured` boolean, required: False = no completed run yet — NOT 'no usages'.
  - `formula` object, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/sonenta/apis/sonenta-api.md) · [All operations](https://skmtc.dev/sonenta/apis/sonenta-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sonenta/apis/sonenta-api/revisions/f853ea49fb05?raw)
