Skip to main content
GET
/
snapshots
/
{snapshotId}
/
tree
Get snapshot file tree
curl --request GET \
  --url https://ascii.dev/api/box/v1/snapshots/{snapshotId}/tree \
  --header 'Authorization: Bearer <token>'
{
  "ok": true,
  "type": "snapshot.tree",
  "snapshotId": "7417be09-d419-4ae0-b3fc-7f04a5a71ef1",
  "boxId": "bx_23456789",
  "generation": 3,
  "treeAvailable": true,
  "truncated": false,
  "fileCount": 6781,
  "totalSizeBytes": 458291,
  "entries": [
    {
      "path": "src",
      "kind": "dir"
    },
    {
      "path": "src/main.ts",
      "kind": "file",
      "size": 1024
    }
  ]
}

Authorizations

Authorization
string
header
required

Box bearer token in the form box_.... Service API keys authenticate Box operations.

Path Parameters

snapshotId
string<uuid>
required

Snapshot id returned by the snapshot list/latest calls.

Response

Flat file/folder listing for the snapshot.

ok
boolean
required
Example:

true

type
string
required

Stable success envelope discriminator added by v1.

Allowed value: "snapshot.tree"
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
totalSizeBytes
integer
required
entries
object[]
required
reason
string

Why the tree is unavailable, when treeAvailable is false.

Examples:

"legacy_snapshot"

"inventory_too_large"