---
title: "Download the file of a kept inspection"
method: GET
path: "/api/v1/history/{id}/file"
tags: ["Retention"]
---

# Download the file of a kept inspection

`GET /api/v1/history/{id}/file`

## Request

- Base URL: `https://tamperlens.com` (the document declares no server; this is the origin it was published from)
- URL: `https://tamperlens.com/api/v1/history/{id}/file`
- Auth: none declared

Only when the account keeps files (`bytesDays`) and this inspection's file is still kept. The bytes are decrypted and authenticated in full before the first one is sent. The download is named `<id>.<extension>`: the original filename was never stored.

404 `inspection_not_found` (no such record in this account), 404 `file_not_retained` (the record exists but its file was not kept or was deleted), 410 `file_expired`, 503 `retention_bytes_unavailable` (the server cannot decrypt files right now), 503 `busy` with `Retry-After` (too many kept files are being served or inspected at once). A download that stops being read for 5 seconds, averages under 64 KB/s, or runs past 30 seconds is cut off.

## Path parameters

- `id` string, required

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `404`: Default Response
- `410`: Default Response
- `415`: Default Response
- `429`: Default Response
- `500`: Default Response
- `503`: Default Response

---

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