Docs
Snapshots and forks ›

Get snapshot tree

GET/v1/snapshots/{id}/tree

Get snapshot tree.

Requestcurl
  1. curl https://agental.io/v1/snapshots/sbx_2a9a47e50daec64a/tree \
  2. -H "Authorization: Bearer $AGENTAL_API_KEY"
Answer200 OK
  1. {
  2. "entries": [{
  3. "path": string,
  4. "kind": "file" | "directory",
  5. "size": integer | null,
  6. }],
  7. }

The files in a snapshot that is browsable.

Path

idrequired
string

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 The files in a snapshot that is browsable.

JSON1 field
entries
object[]3 fields
path
string
kind
filedirectory
size
integernull

Errors and other answers

404 Not found.
501snapshot_files_unavailable this snapshot is of a whole machine, and its files are reached by rolling back to it.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.