API ReferenceFiles
Write a sandbox file
Writes at most 2 MiB into the sandbox's /code tree.
Authorization
bearerAuth AuthorizationBearer <token>
A RemoteHost API key (rh_sk_...) or a user session token.
In: header
Path Parameters
sandboxId*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/sandboxes/string/file" \ -H "Content-Type: application/json" \ -d '{ "path": "string", "content": "string" }'{ "path": "string", "size": 0}Read a sandbox file GET
Returns the content as UTF-8, or as base64 for binary files, with its size in bytes. Relative paths resolve beneath /code.
Read a directory tree GET
Returns directory entries grouped by parent path. This is a filesystem listing, not a persistent sandbox backup. Requires a running Firecracker sandbox and sandbox.files.read.