Promote Deployment
POST
/deployments/{deployment_id}/promote
const url = 'https://api.mengi.cloud/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/promote';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"target_cluster_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","new_name":"example","delete_source":false,"overrides":{"name":"example","config":{},"cpu_request":1,"memory_request_mb":1,"replicas":1,"container_port":1,"storage_size_gb":1,"environment_variables":[{"name":"example","value":"example","secret_ref":"example"}],"docker_image":"example","volumes":[{"path":"example","sizeGb":10,"purpose":"example"}],"helm_chart_version":"example","custom_values_yaml":"example","image_update_strategy":"example","image_update_constraint":"example","image_allow_tags":"example","image_ignore_tags":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.mengi.cloud/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/promote \ --header 'Content-Type: application/json' \ --data '{ "target_cluster_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "new_name": "example", "delete_source": false, "overrides": { "name": "example", "config": {}, "cpu_request": 1, "memory_request_mb": 1, "replicas": 1, "container_port": 1, "storage_size_gb": 1, "environment_variables": [ { "name": "example", "value": "example", "secret_ref": "example" } ], "docker_image": "example", "volumes": [ { "path": "example", "sizeGb": 10, "purpose": "example" } ], "helm_chart_version": "example", "custom_values_yaml": "example", "image_update_strategy": "example", "image_update_constraint": "example", "image_allow_tags": "example", "image_ignore_tags": "example" } }'Promote/migrate a deployment to another cluster.
This copies the deployment configuration to a new cluster without migrating any state or persistent data. The new deployment will start fresh on the target cluster.
The promotion is performed asynchronously by the worker. The new deployment is created with PROMOTING status and will transition to RUNNING when complete.
Use cases:
- Shared vCluster → Dedicated cluster (scaling up)
- Dedicated cluster → Dedicated cluster (region/provider change)
- Dedicated cluster → Shared vCluster (scaling down for cost savings)
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” deployment_id
required
Deployment Id
string format: uuid
Request Body required
Section titled “Request Body required ” Media type application/json
DeploymentPromotionRequest
Request to promote/migrate a deployment to another cluster.
object
target_cluster_id
required
Target Cluster Id
string format: uuid
delete_source
Delete Source
boolean
overrides
Any of:
DeploymentUpdate
object
environment_variables
volumes
Any of:
Array<object>
VolumeConfigVolume configuration for persistent storage.
null
null
Responses
Section titled “ Responses ”Successful Response
Media type application/json
DeploymentPromotionResponse
Response after promoting a deployment.
object
source_deployment_id
required
Source Deployment Id
string format: uuid
new_deployment_id
required
New Deployment Id
string format: uuid
target_cluster_id
required
Target Cluster Id
string format: uuid
source_deleted
required
Source Deleted
boolean
message
required
Message
string
Example generated
{ "source_deployment_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "new_deployment_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "target_cluster_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "source_deleted": true, "message": "example"}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}