v1

latestOpenAPI 3.1.02026-07-26102158206.8 KB
CVMs

Update CVM

Unified PATCH endpoint for CVM updates. Only fields present in the request body are applied. Handles resource resize, compose configuration, visibility, environment, and OS image updates. For contract-owned KMS, compose-hash-affecting changes require two-phase flow with on-chain hash registration.

patch/api/v1/cvms/{cvm_id}

Path parameters

cvm_idstring required

Headers

X-Compose-Hashstring nullable

Compose hash from Phase 1 response (Phase 2 only)

Compose hash from Phase 1 response (Phase 2 only)

X-Transaction-Hashstring nullable

Transaction hash proving on-chain registration (Phase 2 only)

Transaction hash proving on-chain registration (Phase 2 only)

X-Prepare-Onlystring nullable

When 'true', generate a commit token for multisig workflows instead of expecting immediate on-chain registration

When 'true', generate a commit token for multisig workflows instead of expecting immediate on-chain registration

Request body

docker_compose_filestring nullable

Docker Compose YAML content

pre_launch_scriptstring nullable

Shell script executed before containers start

allowed_envsstring[] nullable

Allowed environment variable names (env_keys)

public_logsboolean nullable

Expose container logs publicly

public_sysinfoboolean nullable

Expose system info publicly

public_tcbinfoboolean nullable

Expose TCB attestation info publicly

encrypted_envstring nullable

Encrypted environment variables as hex string

user_configstring nullable

User configuration string

vcpuinteger nullable

Number of vCPUs

memoryinteger nullable

Memory in MB

disk_sizeinteger nullable

Disk size in MB

imagestring nullable

OS image name or slug from available-os-images

shutdown_timeoutinteger nullable

Timeout in seconds for graceful shutdown. null means no timeout.

allow_force_stopboolean

When true, falls back to hard stop if graceful shutdown times out. Use for zombie CVMs that are unresponsive to shutdown signals.

Response

Update initiated, track via correlation_id

{"stackTrail":"paths:/api/v1/cvms/{cvm_id}:patch:responses:202:content:application/json:schema","oasType":"schema","type":"unknown"}