Skip to content

Promote Database

POST
/databases/{database_id}/promote
curl --request POST \
--url https://api.mengi.cloud/databases/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/promote

Promote a replica to primary within its replication group.

database_id
required
Database Id
string format: uuid

Successful Response

Media type application/json
DatabaseResponse
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
engine
required
DatabaseEngine
string
Allowed values: postgresql mysql
engine_version
required
Engine Version
string
tier
required
DatabaseTier
string
Allowed values: single ha replicated
status
required
DatabaseStatus
string
Allowed values: pending provisioning running degraded upgrading error deleting
cpu_request
Any of:
number
memory_request_mb
Any of:
integer
storage_size_gb
required
Storage Size Gb
integer
replicas
required
Replicas
integer
database_name
required
Database Name
string
max_connections
Any of:
integer
extensions
Any of:
Array<string>
external_access
External Access
boolean
external_host
Any of:
string
custom_domain
Any of:
string
dns_credential_id
Any of:
string format: uuid
bunny_zone_id
Any of:
integer
connection_host
Any of:
string
connection_port
Any of:
integer
connection_secret_name
Any of:
string
backup_enabled
required
Backup Enabled
boolean
backup_schedule
Any of:
string
backup_retention_days
Any of:
integer
git_path
Any of:
string
argocd_app_name
Any of:
string
replication_group_id
Any of:
string format: uuid
replication_role
Any of:
string
replication_source_id
Any of:
string format: uuid
replication_host
Any of:
string
replication_lag_bytes
Any of:
integer
replication_status
Any of:
string
error_message
Any of:
string
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
Example
{
"engine": "postgresql",
"tier": "single",
"status": "pending",
"external_access": false
}

Validation Error

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