Skip to content
Subako Docs
English
Esc
↑↓navigate↵open⌘Jpreview

List a session tree's volume files

Every session of a tree shares its root’s volume, so any of them names it. Entries come in the order a depth-first walk visits them, siblings by name, one page at a time: a page ends at limit entries or at 5 MB of entries, whichever comes first. List with depth=children to browse one directory at a time.

GET/v1/sessions/{session_id}/volume/{area}
Authorization
AuthorizationBearer token · headerrequired
Path parameters
session_idstring<uuid>required
Session id
areaVolumeAreaParamrequired
The area to list in.
Allowed:tmpdata
Query parameters
prefixstring
The path in the area to list beneath, segments joined by `/`; the area itself when omitted.
depthVolumeListDepthParam
`all` when omitted.
Allowed:allchildren
afterstring
Entries past this path in the listing's order: a page's `next_cursor`.
limitinteger
10000 when omitted.
min 1 · max 10000
Responses
200One page of the entries beneath the prefix. Empty for a tree whose functions have written nothing yet.
entriesVolumeFileBody[]required
Show properties
Array of VolumeFileBody
kindVolumeFileKindBodyrequired
Allowed:filedirsymlink
modifiedstring<date-time>required
When the entry itself last changed, in UTC.
pathstringrequired
The entry's path in the area, e.g. `notes/a.txt`.
sizeinteger<int64>required
Bytes for a file; 0 for a directory or a symlink.
min 0
next_cursorstring | nullrequired
Pass back as `after` for the next page; `null` on the last page.
truncatedbooleanrequired
True when another page follows, which `next_cursor` then starts.
400Malformed path parameter, prefix, depth, or limit, a cursor not beneath the prefix, or the data area where the root agent does not enable it.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
401Missing, malformed, or invalid bearer token.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
403A workspace credential lacking session.read. A session token carries no permissions and never lands here.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
404No such session, or the caller cannot see it, or the tree has no function grant, or the deployment runs no functions.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET "https://api.us.cloud.subako.ai/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/volume/tmp" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "entries": [
    {
      "kind": "file",
      "modified": "2019-08-24T14:15:22Z",
      "path": "string",
      "size": 0
    }
  ],
  "next_cursor": "string",
  "truncated": true
}