---
title: "/api/filepaths"
method: GET
path: "/api/filepaths"
tags: ["filepaths"]
---

# /api/filepaths

`GET /api/filepaths`

## Request

- Base URL: `https://vulnerabilityhistory.org`
- URL: `https://vulnerabilityhistory.org/api/filepaths`
- Auth: none required
- TypeScript: <https://skmtc.dev/vulnerabilityhistoryproject/apis/vulnerability-history-project-restful-api/docs/api/filepaths/get.ts> (a function with typed inputs; its response is checked against the schema)

List all files touched by any commit in the database

## Query parameters

- `offenders` boolean

## Response `200`

OK

- object[]
  - `id` integer
  - `filepath` string
  - `slug` string: A URL-friendly conversion of a filepath to serves a unique identifier. We use ActiveSupport's `parameterize` for this, which replaces most non-word characters with hyphens. For example, for project `foo` and file `mydir/myfile.c`, it's `foo-mydir-myfile-c` The filepath slug is guaranteed to be globally unique across all VHP data.
  - `dir` string
  - `is_code` boolean
  - `note` string
  - `project_id` integer

## Other responses

- `400`: Malformed request.
- `500`: Internal error. Please report these on our [issue tracker](https://github.com/VulnerabilityHistoryProject/vulnerability-history/issues).

## Changes

- **2023-03-15** `a9815c68a104`: 1 info
  - endpoint added
- **2022-07-01** `520c4d9ba9e9`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/vulnerabilityhistoryproject/apis/vulnerability-history-project-restful-api/changes/api/filepaths/get.md)

---

[API](https://skmtc.dev/vulnerabilityhistoryproject/apis/vulnerability-history-project-restful-api.md) - [All operations](https://skmtc.dev/vulnerabilityhistoryproject/apis/vulnerability-history-project-restful-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vulnerabilityhistoryproject/apis/vulnerability-history-project-restful-api/revisions/2390172697da?raw)
