File Exists
Filesystem API
File Exists
Check whether a path exists inside a sandbox.
GET
File Exists
Checks whether a file or directory exists at the given path inside the sandbox.
Returns
{ "exists": true } or { "exists": false }.
Use this endpoint to guard against re-writing files that already exist, or to
verify that a command produced its expected output.
Path Parameters
The sandbox identifier. Format:
sbx-<8 chars>.Query Parameters
Absolute path to check inside the sandbox.Example:
/home/user/script.pyResponse
true if the path exists (as any entry type), false otherwise.Example
Response (exists)
Response (not found)
Error Responses
| Status | Cause |
|---|---|
401 | Missing or invalid API key |
404 | Sandbox not found |
502 | envd daemon unreachable |
503 | Sandbox has no VM |