Apps

Create a new instance under an existing app

Changed on

Deploy a new CVM instance under an existing app, optionally with a new Docker Compose file. For on-chain KMS apps, this uses a two-phase flow: the first request returns HTTP 465 with a commit token; after registering the compose hash on-chain, the second request commits with the token and transaction hash.

post/api/v1/apps/{app_id}/instances

Request

Path parameters

app_idstring required

Hex app identifier

Request body

nodestring nullable

Physical node name

os_imagestring nullable

Target OS image name or slug

encrypted_envstring nullable

New encrypted env blob (hex). Required when the source CVM has managed_env enabled.

compose_hashstring nullable

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

docker_compose_filestring nullable

New Docker Compose YAML content

pre_launch_scriptstring nullable

New pre-launch script content

namestring nullable

Custom CVM name for the new instance

tokenstring nullable

Commit token returned by a prior prepare-only request. When set, this request commits the previously-prepared instance instead of preparing a new one.

transaction_hashstring nullable

On-chain transaction hash proving compose-hash registration. Use 'already-registered' (or omit) when the hash was registered earlier.

Response

Instance created

namestring required
statusstring required
teepod_idinteger required
app_idstring required
vm_uuidstring nullable
instance_idstring nullable
app_urlstring nullable
base_imagestring nullable
vcpuinteger required
memoryinteger required
disk_sizeinteger required
manifest_versioninteger nullable
versionstring nullable
runnerstring nullable
docker_compose_filestring nullable
featuresstring[] nullable
created_atstring date-time required
encrypted_env_pubkeystring nullable

Example response

{
  "id": "cvm_0123abcd",
  "user_id": "usr_0123abcd"
}

Changes

    • breaking

      response property id list-of-types was widened by adding types string to media type application/json of response 200

    • breaking

      response property user_id list-of-types was widened by adding types string to media type application/json of response 200

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property