List a folder
List a folder
GET/v1/sandboxes/{sandbox_id}/files:list
A key with the files:read scope.
Request
curl "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/files:list?path=/root/hello.py" \
-H "Authorization: Bearer $POD_API_KEY"Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
sandbox_id | path | string | Yes | |
path | query | string | Yes | An absolute path inside the sandbox. |
Pod-End-User | header | string | No | Narrows a project key to one of its end users: the call sees only that end user's sandboxes and usage, any other answering not_found, and a create is labelled with it. An end user of another project, or one that is not there, is not_found; a suspended one refuses creates and wakes (account_restricted). |
limit | query | integer | No | |
cursor | query | string | No | The next_cursor of the page before. Valid for 24 hours. |
Answer
200. A page of the folder's entries, by name.
{
"data": [
{
"path": "example",
"type": "file",
"size_bytes": 0,
"mode": "example",
"modified_at": "2026-11-23T12:00:00.000Z"
}
],
"next_cursor": null
}| Field | Type | Always | What it is |
|---|---|---|---|
data | FileInfo[] | Yes | |
next_cursor | string | null | Yes |
Errors
The refusals this call is known for: invalid, not_found, not_ready, guest_unavailable, in_other_cell. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.
In the SDKs
| Client | Call |
|---|---|
| TypeScript | sandbox.files.list(path) |
| Python | sandbox.files.list(path) |
| mpod | mpod sandboxes files list <sandbox> <path> |