Skip to main content
PATCH
Stage CVM changes

Path Parameters

cvm_id
string
required

Body

application/json

PATCH request body — all fields optional, only set fields are applied.

docker_compose_file
string | null

Docker Compose YAML content

pre_launch_script
string | null

Shell script executed before containers start

allowed_envs
string[] | null

Allowed environment variable names (env_keys)

public_logs
boolean | null

Expose container logs publicly

public_sysinfo
boolean | null

Expose system info publicly

public_tcbinfo
boolean | null

Expose TCB attestation info publicly

compose
ComposePatch · object | null

JSON Merge Patch of the app compose

init_scripts
enum<string>[] | null

Platform init scripts this CVM runs, replacing the current set. Enabling docker_cleanup requires confirm_data_wipe.

Available options:
docker_cleanup,
env_merge
confirm_data_wipe
boolean
default:false

Confirms turning on docker_cleanup or requirements.ephemeral_data_disk, which erase data on every boot.

encrypted_env
string | null

Encrypted environment variables as hex string

user_config
string | null

User configuration string

gpus
GpuConfig · object | null

GPU configuration

vcpu
integer | null

Number of vCPUs

memory
integer | null

Memory in MB

disk_size
integer | null

Disk size in GB

instance_type
string | null

Instance type identifier (e.g. tdx.medium)

image
string | null

OS image name or slug from available-os-images

shutdown_timeout
integer | null

Timeout in seconds for graceful shutdown. null uses the platform default.

Required range: 10 <= x <= 1200
allow_force_stop
boolean
default:false

When true, skips graceful shutdown and force stops the CVM immediately.

Response

Successful Response

The CVM's staged changes and the compose hash applying them produces.

base_compose_hash
string | null
required

The CVM's compose hash when the first change was staged

current_compose_hash
string | null
required

The CVM's compose hash now; apply is rejected while it differs from the base

preview_compose_hash
string
required

The compose hash the CVM runs after apply. For contract-owned KMS, register it on-chain before applying.

patch
Patch · object
required

The one PATCH /cvms/{cvm_id} body the apply sends: the entries applied in order to the CVM's current compose

entries
CvmDraftEntry · object[]
required

The staged patches, oldest first