Update Deployment
PATCH
/deployments/{deployment_id}
const url = 'https://api.mengi.cloud/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"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 PATCH \ --url https://api.mengi.cloud/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --data '{ "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" }'Update a deployment’s configuration.
Changes will regenerate the values.yaml and queue a worker job to sync to Git, triggering ArgoCD to redeploy with the new configuration.
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
DeploymentUpdate
object
environment_variables
volumes
Any of:
Array<object>
VolumeConfigVolume configuration for persistent storage.
null
Responses
Section titled “ Responses ”Successful Response
Media type application/json
DeploymentResponse
object
id
required
Id
string format: uuid
user_id
required
User Id
string format: uuid
cluster_id
required
Cluster Id
string format: uuid
name
required
Name
string
app_type
required
AppType
string
status
required
DeploymentStatus
string
is_adopted
Is Adopted
boolean
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
Example
{ "app_type": "web_app", "status": "pending", "is_adopted": false}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" } ]}