Sandbox API
Get sandbox content by path
Get the contents of a directory or file metadata at the specified path in a sandbox. The sandbox must be running.
get/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/content/{path}
Path parameters
workspace_domainstring required
Example:my-company
The human-readable ID of the workspace
sandbox_idstring required
Example:sb-1234567890abcdef
The ID of the sandbox
pathstring required
Example:buddy/src
Absolute path to the file or directory. Recommended directory is /buddy
Response
Content retrieved successfully
Example response
{
"contents": [
{
"type": "FILE",
"name": "index.js",
"path": "app/src/index.js",
"size": 1024
}
]
}