---
title: "Download a file or folder from a snapshot"
method: GET
path: "/snapshots/{snapshotId}/files"
tags: ["Box"]
---

# Download a file or folder from a snapshot

`GET /snapshots/{snapshotId}/files`

## Request

- Base URL: `https://ascii.dev/api/box/v1`
- URL: `https://ascii.dev/api/box/v1/snapshots/{snapshotId}/files`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/ascii/apis/box-public-api-v1/docs/snapshots/:snapshotId/files/get.ts> (a function with typed inputs; its response is checked against the schema)

Stream a single file's bytes, or a folder subtree as a tar archive, directly out of a snapshot — the box can be stopped or archived; the machine is never contacted. Use `GET /snapshots/{snapshotId}/tree` to list paths, then pass one here. Paths are relative to the snapshot root (same space as `tree` entries; docker volumes under `__dockervol__/`). An empty or `/` path downloads the whole snapshot as a tar. Folder responses set `X-Snapshot-File-Count`, `X-Snapshot-Total-Size-Bytes` and `X-Snapshot-Skipped-Base-Image-Files` headers; both response shapes set `X-Snapshot-Entry-Kind` (`file` or `dir`).

## Path parameters

- `snapshotId` string, uuid, required

## Query parameters

- `path` string

## Response `200`

File bytes (`application/octet-stream`) or folder tar (`application/x-tar`).

## Other responses

- `401`: Missing or invalid bearer token.
- `404`: Resource not found.
- `409`: Path has no downloadable bytes — `legacy_snapshot` (pre-inventory snapshot), `snapshot_not_indexed` (content captured before the indexed snapshot format; take a new snapshot or use the download bundle), `base_image_file` (stock image file, not stored in snapshots), or `is_symlink` (request the symlink's target instead).

---

[API](https://skmtc.dev/ascii/apis/box-public-api-v1.md) - [All operations](https://skmtc.dev/ascii/apis/box-public-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/ascii/apis/box-public-api-v1/revisions/82d576f82046?raw)
