GET /compat/e2b/envd/files
envd's `GET /files` (the SDKs' `files.read`). The file's bytes, at most 64 MiB. `path` relative to the user's home is resolved there; `username` (`user` or `root`) picks the home. `404` when no file is there. A request with `signature` or `signature_expiration` (E2B's signed `downloadUrl`) is refused with the envd `401`.

Query Parameters

path string required query
The file; relative paths are taken from the user's home.
username string optional query
`user` (the default) or `root`: whose home a relative path starts from.

Header Parameters

X-Access-Token string required header
The sandbox's envd access token (`b3os_et_…`), from the create or connect answer.
E2b-Sandbox-Id string required header
The sandbox the call is for (`sandboxID` of the create answer). The token must be this sandbox's.

Responses

200 The file.
application/octet-stream
string (binary)
401 The envd call is refused (`envd_token_invalid`), the same answer on every envd path whatever the reason, in E2B's error shape (Connect clients read the 401 as `unauthenticated`).
404 No such live sandbox, template or file (`sandbox_not_found`, `template_not_found`, `file_not_found`).
curl -X GET 'https://beta-api.b3os.org/compat/e2b/envd/files?path=string' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'X-Access-Token: string' \  -H 'E2b-Sandbox-Id: string'
const response = await fetch('https://beta-api.b3os.org/compat/e2b/envd/files?path=string', {  method: 'GET',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "X-Access-Token": "string",      "E2b-Sandbox-Id": "string"  }});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN',    'X-Access-Token': 'string',    'E2b-Sandbox-Id': 'string'}response = requests.get('https://beta-api.b3os.org/compat/e2b/envd/files?path=string', headers=headers)print(response.json())
200 Response
"<binary>"
Ask a question... ⌘I