Skip to main content
GET
Download a sandbox file

Authorizations

X-Access-Token
string
header
required

Sandbox data-plane token — the sandbox_access_token returned by the create/connect endpoints. Used for /files, Sandbox-Exec, and other data-plane endpoints; the control plane (/api/v2) does not accept it, and conversely the control plane's Authorization: Bearer is invalid on the data plane.

The token is bound to its sandbox: using sandbox A's token against sandbox B's host fails. It stays valid until the sandbox's lifetime ends; there is no separate rotation endpoint (rotate_traffic_token rotates the port traffic token traffic_access_token and does not affect this one).

Headers

Range
string

Only honored in data centers with Accept-Ranges: bytes; format bytes=<start>-<end>. Other data centers ignore the header and return 200 + the full file (not 206).

Query Parameters

path
string
required

Absolute path inside the sandbox. Must start with /; relative segments such as . / .. are rejected. No semantic interpretation is applied beyond existence checks; for writes, the parent directory must already exist.

Minimum string length: 1
username
string

Perform the file operation as this user; defaults to the sandbox's default user. Optional capability: some data centers ignore this parameter and always act as the default user, so do not rely on it for permission isolation.

Response

The full file. Requests with Range also take this branch when the data center does not support resuming.

The response is of type file.