Skip to content

Update Deployment

PATCH
/deployments/{deployment_id}
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", "custom_domain": "example", "failover_health_route": true, "health_checks": { "liveness": { "enabled": true, "type": "http", "path": "example", "initial_delay_seconds": 1, "period_seconds": 1, "timeout_seconds": 1, "failure_threshold": 1 }, "readiness": { "enabled": true, "type": "http", "path": "example", "initial_delay_seconds": 1, "period_seconds": 1, "timeout_seconds": 1, "failure_threshold": 1 }, "startup": { "enabled": true, "type": "http", "path": "example", "initial_delay_seconds": 1, "period_seconds": 1, "timeout_seconds": 1, "failure_threshold": 1 } }, "additional_ports": [ { "port": 1, "name": "example", "protocol": "TCP" } ], "backups": { "enabled": false, "schedule": "hourly", "retention_days": 7 }, "command": [ "example" ], "args": [ "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.

Service principal (X-Service-Token) may update any deployment — internal tooling uses this same public endpoint per the dogfood principle (e.g. ops migrations of env secret_refs).

deployment_id
required
Deployment Id
string format: uuid
Media typeapplication/json
DeploymentUpdate
object
name
Any of:
string
config
Any of:
object
key
additional properties
any
cpu_request
Any of:
number
memory_request_mb
Any of:
integer
replicas
Any of:
integer
container_port
Any of:
integer
storage_size_gb
Any of:
integer
environment_variables
Any of:
Array<object>
EnvironmentVariable

Environment variable configuration.

object
name
required
Name
string
value
Any of:
string
secret_ref
Any of:
string
docker_image
Any of:
string
volumes
Any of:
Array<object>
VolumeConfig

Volume configuration for persistent storage.

object
path
required
Path
string
sizeGb
Sizegb
integer
default: 10
purpose
Any of:
string
helm_chart_version
Any of:
string
custom_values_yaml
Any of:
string
image_update_strategy
Any of:
string
image_update_constraint
Any of:
string
image_allow_tags
Any of:
string
image_ignore_tags
Any of:
string
custom_domain
Any of:
string
failover_health_route
Any of:
boolean
health_checks
Any of:
HealthChecksConfig

Container health check configuration (stored in the deployment config).

On update, an empty object clears any overrides and restores automatic detection.

object
liveness
Any of:
HealthCheckProbe

One container health check (liveness or readiness probe).

All fields except enabled are optional: an unset type keeps the auto-detected HTTP/TCP choice, an unset path keeps the detected endpoint, and unset timings keep the platform defaults.

object
enabled
Enabled
boolean
default: true
type
Any of:
string
Allowed values: http tcp
path
Any of:
string
initial_delay_seconds
Any of:
integer
<= 3600
period_seconds
Any of:
integer
>= 1 <= 3600
timeout_seconds
Any of:
integer
>= 1 <= 3600
failure_threshold
Any of:
integer
>= 1 <= 1000
readiness
Any of:
HealthCheckProbe

One container health check (liveness or readiness probe).

All fields except enabled are optional: an unset type keeps the auto-detected HTTP/TCP choice, an unset path keeps the detected endpoint, and unset timings keep the platform defaults.

object
enabled
Enabled
boolean
default: true
type
Any of:
string
Allowed values: http tcp
path
Any of:
string
initial_delay_seconds
Any of:
integer
<= 3600
period_seconds
Any of:
integer
>= 1 <= 3600
timeout_seconds
Any of:
integer
>= 1 <= 3600
failure_threshold
Any of:
integer
>= 1 <= 1000
startup
Any of:
HealthCheckProbe

One container health check (liveness or readiness probe).

All fields except enabled are optional: an unset type keeps the auto-detected HTTP/TCP choice, an unset path keeps the detected endpoint, and unset timings keep the platform defaults.

object
enabled
Enabled
boolean
default: true
type
Any of:
string
Allowed values: http tcp
path
Any of:
string
initial_delay_seconds
Any of:
integer
<= 3600
period_seconds
Any of:
integer
>= 1 <= 3600
timeout_seconds
Any of:
integer
>= 1 <= 3600
failure_threshold
Any of:
integer
>= 1 <= 1000
additional_ports
Any of:
Array<object>
AdditionalPort

An extra container port, exposed on the pod and the deployment’s in-cluster Service (the ingress keeps routing to the main container port).

name must be a valid Kubernetes port name (lowercase alphanumerics and ‘-’, at most 15 chars, at least one letter); it defaults to port-. An unset protocol means TCP.

object
port
required
Port
integer
>= 1 <= 65535
name
Any of:
string
protocol
Any of:
string
Allowed values: TCP UDP
backups
Any of:
BackupsConfig

Scheduled backup configuration (stored in the deployment config).

Backups capture the deployment’s namespace: workload configuration, in-namespace secrets, and all persistent volume data. Managed databases are excluded — they have their own backup mechanism. Requires a dedicated cluster and the “backups” feature flag.

object
enabled
Enabled
boolean
schedule
Schedule
string
default: daily
Allowed values: hourly daily weekly
retention_days
Retention Days
integer
default: 7 >= 1 <= 90
command
Any of:
Array<string>
args
Any of:
Array<string>

Successful Response

Media typeapplication/json
DeploymentResponse
object
id
required
Id
string format: uuid
user_id
required
User Id
string format: uuid
organization_id
Any of:
string format: uuid
cluster_id
required
Cluster Id
string format: uuid
name
required
Name
string
app_type
required
AppType
string
Allowed values: web_app api database static_site container helm
status
required
DeploymentStatus
string
Allowed values: pending provisioning promoting running stopped failed error migrating deleting
config
Any of:
object
key
additional properties
any
values_yaml
Any of:
string
git_path
Any of:
string
endpoint_url
Any of:
string
error_message
Any of:
string
cpu_request
Any of:
number
memory_request_mb
Any of:
integer
replicas
Any of:
integer
container_port
Any of:
integer
storage_size_gb
Any of:
integer
command
Any of:
Array<string>
args
Any of:
Array<string>
deployment_type
Any of:
string
helm_repo_url
Any of:
string
helm_chart_name
Any of:
string
helm_chart_version
Any of:
string
custom_values_yaml
Any of:
string
image_update_strategy
Any of:
string
image_update_constraint
Any of:
string
image_allow_tags
Any of:
string
image_ignore_tags
Any of:
string
is_adopted
Is Adopted
boolean
source_namespace
Any of:
string
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
provider
Any of:
string
region
Any of:
string
cluster_status
Any of:
string
cluster_error
Any of:
string
Example
{
"app_type": "web_app",
"status": "pending",
"is_adopted": false
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}