Write a file
PUT
Create or replace a file. Up to 5 MiB.
Authorization
AuthorizationheaderrequiredBearer YOUR_API_KEY. Create a key in the dashboard.
Path parameters
sandboxIdstringrequiredSandbox ID.
Body
application/json
pathstringrequiredAbsolute, or relative to
/home/user. Must resolve under/home/useror/tmp.contentstringrequiredUp to 5 MiB after decoding.
encodingstringUse
base64for binary files.One ofutf8base64Defaultutf8
Responses
200Written.
fileobjectrequired4 properties
pathstringrequiredcontentstringPresent on read.
encodingstringOne ofutf8base64sizeintegerrequiredBytes.
400Invalid body or path.
codestringrequiredmessagestringrequireddetailsobject
401Unauthorized.
codestringrequiredmessagestringrequireddetailsobject
404Sandbox not found, or it belongs to another project.
codestringrequiredmessagestringrequireddetailsobject
409`sandbox_not_running`: the sandbox is stopped, stopping, failed or deleted; resume it first. `sandbox_not_ready`: it is still starting and did not become ready in time; retry.
codestringrequiredmessagestringrequireddetailsobject
413`file_too_large`: the content is larger than 5 MiB.
codestringrequiredmessagestringrequireddetailsobject