Read a single guest file
GET/sandboxes/{id}/files
Returns the raw bytes of one guest file (?path), capped at ?max_bytes. Content only, guest → host; nothing is written host-side.
path parameters
object
idstringrequiredSandbox ID, e.g. sbx_ab12cd34.
query parameters
object
pathstringrequiredGuest file path to read.
max_bytesintegerCap on bytes returned (default 10 MiB).
Responses
200 OKOK
stringbase64
400 Bad requestBad Request
ErrorResponse
errorstring404 Not foundNot Found
ErrorResponse
errorstringAuthentication
bearerAuthHTTP bearer. Daemon API key. Omit on a keyless loopback daemon.Request
▍GET/sandboxes/{id}/files
curl '/sandboxes/{id}/files?path=&max_bytes='const response = await fetch("/sandboxes/{id}/files?path=&max_bytes=", {
method: "GET",
});
const data = await response.json();import requests
response = requests.get(
"/sandboxes/{id}/files?path=&max_bytes=",
)
data = response.json()Response
200 OK
No response body.