Skip to main content
POST
/
api
/
v1
/
apps
/
{app_id}
/
cvms
/
{vm_uuid}
/
replicas
Create CVM replica
curl --request POST \
  --url https://cloud-api.phala.com/api/v1/apps/{app_id}/cvms/{vm_uuid}/replicas \
  --header 'Content-Type: application/json' \
  --data '
{
  "teepod_id": 123,
  "node_id": 123,
  "encrypted_env": "<string>",
  "compose_hash": "<string>"
}
'
{
  "id": 123,
  "name": "<string>",
  "status": "<string>",
  "teepod_id": 123,
  "app_id": "<string>",
  "vcpu": 123,
  "memory": 123,
  "disk_size": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "teepod": {
    "id": 123,
    "name": "<string>"
  },
  "user_id": 123,
  "vm_uuid": "<string>",
  "instance_id": "<string>",
  "app_url": "<string>",
  "base_image": "<string>",
  "manifest_version": 123,
  "version": "<string>",
  "runner": "<string>",
  "docker_compose_file": "<string>",
  "features": [
    "<string>"
  ],
  "encrypted_env_pubkey": "<string>"
}

Headers

X-Prepare-Only
string | null

Path Parameters

app_id
string
required

Hex app identifier

vm_uuid
string
required

Source CVM UUID

Body

application/json

Request model for CVM replication.

teepod_id
integer | null

Target node ID (deprecated, use node_id)

node_id
integer | null

Target node ID for the replica

encrypted_env
string | null

New encrypted env blob (hex)

compose_hash
string | null

Explicit compose hash to replicate. Required when the source app has multiple live instances.

Response

Replica CVM created

id
integer
required
name
string
required
status
string
required
teepod_id
integer
required
app_id
string
required
vcpu
integer
required
memory
integer
required
disk_size
integer
required
created_at
string<date-time>
required
teepod
TeepodMeta · object
user_id
integer | null
vm_uuid
string | null
instance_id
string | null
app_url
string | null
base_image
string | null
manifest_version
integer | null
version
string | null
runner
string | null
docker_compose_file
string | null
features
string[] | null
encrypted_env_pubkey
string | null