Read a file, or a directory as tar
Without archive, returns the bytes of the file at path. With archive=tar,
returns the directory at path as an uncompressed tar stream. Entries are
relative to path and can start with ./. A directory read without
archive=tar returns 400.
The content type is application/octet-stream in both cases. A tar response has
no content-length.
A sandbox runs code you may not trust. When you unpack a downloaded tar, refuse symlinks, hard links, and paths that leave the target directory.
Scope: sandboxes.
Authentication
A Meadow API key, sent as Authorization: Bearer mdw_.... The header
x-api-key: mdw_... is accepted in its place.
Path parameters
The sandbox id returned by POST /v1/sandboxes. It must belong to the key’s project.
Query parameters
Absolute path inside the sandbox, at most 4096 bytes, with no .. segment.
For a single file it must not end with /.
Set to tar to send or receive a directory as an uncompressed tar stream.
Entries are relative to path, with no top-level folder. Any other value
returns 400.
Response headers
Meadow’s id for this request, req_ and 24 hex characters. Every response
carries it, including errors, streams and unknown routes. Every error in the
Error schema repeats it as request_id. Quote it when you report a problem.