Hanzo
OpenapiSandbox

Write a file into a sandbox you hold

Writes bytes to one path in the caller's sandbox, creating parents, and answers the resolved path.

POST /v1/sandbox/write

Addresshttps://api.hanzo.ai/v1/sandbox/write
MethodPOST
Operationwrite_sandbox_file
AuthAuthorization: Bearer $HANZO_API_KEY

Writes bytes to one path in the caller's sandbox, creating parents, and answers the resolved path.

Request

3 fields, body application/json (required).

FieldInTypeRequiredDescription
databodystringData is the file's bytes, and replaces whatever was there.
idbodystringID is the sandbox to write into, from an earlier lease.
pathbodystringPath is confined the same way PathIn.Path is.

Response

StatusBodyMeaning
200Wroteok

200 body — 2 fields.

FieldInTypeAlwaysDescription
bytesbodyintegerBytes is how many bytes the file now holds.
pathbodystringPath is where the bytes actually landed: the caller's path resolved against the sandbox's working directory (Leased.Workdir), which is what a later read or a…

Failure carries the platform error shape — see Errors.

Examples

hanzo sandboxes write

Sandbox API · All Hanzo APIs · Interactive reference

How is this guide?

On this page