---
title: "Get snapshot file tree"
method: GET
path: "/snapshots/{snapshotId}/tree"
tags: ["Box"]
---

# Get snapshot file tree

`GET /snapshots/{snapshotId}/tree`

## Request

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

List the files and folders captured in a snapshot, with sizes. Returns a flat list of entries you can render as a tree.

## Path parameters

- `snapshotId` string, uuid, required

## Response `200`

Flat file/folder listing for the snapshot.

- SnapshotTreeResponse
  - `ok` boolean, required
  - `type` 'snapshot.tree', required: Stable success envelope discriminator added by v1.
  - `snapshotId` string, uuid, required
  - `boxId` string, required
  - `generation` integer, required
  - `treeAvailable` boolean, required: `false` for legacy snapshots or inventories too large to expand; see `reason`.
  - `truncated` boolean, required: `true` when the file list was capped; not every entry is returned.
  - `fileCount` integer, required: Number of your files in this snapshot (base-image system files excluded).
  - `totalSizeBytes` integer, required: Total bytes of your data in this snapshot (base-image system files excluded).
  - `entries` SnapshotTreeEntry[], required: Exactly the files/dirs a resume or download returns — your data only; base-image system entries are not listed.
    - `path` string, required: Path relative to the snapshot root. Docker named volumes appear under `__dockervol__/`.
    - `kind` 'file' | 'dir' | 'symlink', required
    - `size` integer: File size in bytes. Omitted for directories.
  - `reason` string: Why the tree is unavailable, when `treeAvailable` is `false`.

## Other responses

- `401`: Missing or invalid bearer token.
- `404`: Resource not found.

---

[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)
