Write a file

Preview. Write the body to a file in a running sandbox, and create its parent directories. A file is at most 100 MiB.

PUT
/sandboxes/{sandbox_id}/files/content

Authorization

headerAuthorizationBearer <token>

Your Munito API key.

Path Parameters

sandbox_id*string

The id of the sandbox.

Query Parameters

path*string

A path in the sandbox. A relative path is under /workspace.

Length1 <= length <= 4096

Request Body

body*fileapplication/octet-stream
Formatbinary

Response Body

The file as it is now.

application/json
  1. response
name*string
path*string
type*string
Value in"file""directory""symlink""other"
size*integer
mode*integer

The permission bits, such as 420 for 0644.

modified_at*integer

Unix seconds.

curl -X PUT 'https://api.munito.ai/sandboxes/v1/sandboxes/string/files/content?path=string' \
  -H 'Content-Type: application/octet-stream' \
  -d 'string'
Example Response
{
  "name": "string",
  "path": "string",
  "type": "file",
  "size": 0,
  "mode": 0,
  "modified_at": 0
}