Files API¶
Manage files inside a sandbox's filesystem.
List Files¶
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
path | string | / | Directory path to list |
Response: 200 OK
[
{
"path": "/workspace/src/main.rs",
"size": 1234,
"is_dir": false,
"mode": 33188,
"modified_at": "2026-03-11T10:00:00Z"
},
{
"path": "/workspace/src",
"size": 4096,
"is_dir": true,
"mode": 16877,
"modified_at": "2026-03-11T10:00:00Z"
}
]
Download File¶
Returns the raw file content as application/octet-stream.
Example:
Upload File¶
Uploads a file. The request body is the raw file content.
Example:
curl -X PUT \
--data-binary @./config.json \
http://localhost:8080/api/v1/sandboxes/<id>/files/workspace/config.json
Response: 200 OK
Delete File¶
Response: 204 No Content