Skip to main content
PUT
/
api
/
v1
/
vm
/
{vm_id}
/
files
cURL
curl --request PUT \
  --url https://api.example.com/api/v1/vm/{vm_id}/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content_b64": "<string>",
  "path": "<string>",
  "create_dirs": true,
  "mode": 1
}
'
{
  "error": "<string>",
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

vm_id
string<uuid>
required

VM ID

Body

application/json

Request body for PUT /api/vm/{vm_id}/files

content_b64
string
required

File contents, base64-encoded.

path
string
required

Destination path on the VM.

create_dirs
boolean

Create parent directories if they don't exist.

mode
integer<int32>

File mode (e.g. 0644). Defaults to 0644 if omitted.

Required range: x >= 0

Response

File written successfully