/workspace and /tmp can be read.
Endpoint
Request
Headers
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | Yes | File path (e.g., /workspace/data.txt) |
Example Request
Response
Success (200 OK)
Response Fields
| Field | Type | Description |
|---|---|---|
content | string | File contents as text |
path | string | File path |
size | integer | File size in bytes |
Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 401 | Unauthorized |
| 403 | Path not allowed (outside allowed directories) |
| 404 | File not found |
Errors
File Not Found (404)
Path Not Allowed (403)
/workspace, /tmp, or other explicitly allowed paths.
Allowed Paths
You can read files from:/workspace/*- Main working directory/tmp/*- Temporary files- Other paths may be allowed depending on sandbox configuration
Use Cases
Read Configuration File
Read Log File
Read CSV Data
Check File Size
Read and Process
Related
- SDK: sandbox.files.read() - Python SDK method
- CLI File Operations - File operations from CLI
Next Steps
- Write File - Write file contents
- List Files - List directory contents
- File Exists - Check if file exists

