---
title: "Get report file"
method: GET
path: "/api/scans/{scan_id}/files/{filename}"
tags: ["reports"]
---

# Get report file

`GET /api/scans/{scan_id}/files/{filename}`

Serve individual files from a scan's report directory.
Path traversal is prevented — the file must be within the report directory.

## Path parameters

- `scan_id` integer, required
- `filename` string, required

## Response `200`

File contents with auto-detected content type

## Other responses

- `400` — Invalid filename (path traversal attempt)
- `404` — Report directory or file not found

---

[API](https://skmtc.dev/bugtraceai/apis/bugtraceai-cli-api.md) · [All operations](https://skmtc.dev/bugtraceai/apis/bugtraceai-cli-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bugtraceai/bugtraceai-cli-api/revisions/312bfc1148dc/schema)
