Returns metadata about a specific file or directory: its name, full path, type,
and size in bytes. Proxies the envd response status code — returns 404 if the
path does not exist.
Path Parameters
The sandbox identifier. Format: sbx-<8 chars>.
Query Parameters
Absolute path of the file or directory to inspect.Example: /home/user/script.py
Response
Filename or directory name (not the full path).
Full absolute path inside the sandbox.
Entry type: "file", "dir", or "symlink".
Size in bytes. 0 for directories.
Example
curl "https://api.declaw.ai/sandboxes/sbx-a1b2c3d4/files/info?path=/home/user/script.py" \
-H "X-API-Key: YOUR_API_KEY"
{
"name": "script.py",
"path": "/home/user/script.py",
"type": "file",
"size": 1024
}
Error Responses
| Status | Cause |
|---|
401 | Missing or invalid API key |
404 | Path not found or sandbox not found |
502 | envd daemon unreachable |
503 | Sandbox has no VM |