Service

Update service auto scaling settings

Changed on

DEPRECATED. Use PATCH /v1/organizations/{organizationId}/services/{serviceId}/replicaScaling instead. Updates minimum and maximum total memory limits and idle mode scaling behavior for the service. The memory settings are available only for "production" services and must be a multiple of 12 starting from 24GB. Gen 2 (v2-default) services use a fixed size and cannot idle: minTotalMemoryGb must equal maxTotalMemoryGb and idleScaling cannot be true.

patch/v1/organizations/{organizationId}/services/{serviceId}/scaling

Request

  • Base URL
    https://api.clickhouse.cloud
  • Auth
    HTTP basic

Path parameters

organizationId, string uuid required

ID of the organization that owns the service.

serviceId, string uuid required

ID of the service to update scaling parameters.

Request body

ServiceScalingPatchRequest required
minTotalMemoryGb, number

DEPRECATED. Inaccurate for services with non-default numbers of replicas. Use minReplicaMemoryGb instead. Minimum memory of three workers during auto-scaling in Gb. Available only for 'production' services. Must be a multiple of 12 and greater than or equal to 24. Always absent for horizontal-autoscaling services (replica count is variable).

maxTotalMemoryGb, number

DEPRECATED. Inaccurate for services with non-default numbers of replicas. Use maxReplicaMemoryGb instead. Maximum memory of three workers during auto-scaling in Gb. Available only for 'production' services. Must be a multiple of 12 and lower than or equal to 360 for non paid services or 1068 for paid services. Always absent for horizontal-autoscaling services (replica count is variable).

numReplicas, integer

Number of replicas for the service. The number of replicas must be between 1 and 50. Further restrictions may apply based on your organization's tier and its per-warehouse replica limit. It defaults to 1 for the BASIC tier and 3 for the SCALE and ENTERPRISE tiers.

idleScaling, boolean

When set to true the service is allowed to scale down to zero when idle. True by default.

idleTimeoutMinutes, number

Set minimum idling timeout (in minutes). Must be >= 5 minutes.

Example request

{
  "minTotalMemoryGb": 48,
  "maxTotalMemoryGb": 360,
  "numReplicas": 3
}

Response

Successful response

object required
status, number

HTTP status code.

requestId, string uuid

Unique id assigned to every request. UUIDv4

result, Service

Example response

{
  "status": 200,
  "result": {
    "endpoints": [
      {
        "protocol": "mysql"
      }
    ],
    "minTotalMemoryGb": 48,
    "maxTotalMemoryGb": 360,
    "minReplicaMemoryGb": 16,
    "maxReplicaMemoryGb": 120,
    "numReplicas": 3,
    "minReplicas": 1,
    "maxReplicas": 5,
    "autoscalingMode": "vertical",
    "replicaMemoryGb": 32,
    "createdAt": "2026-03-26T20:51:16Z",
    "tags": [
      {
        "key": "Environment",
        "value": "staging"
      }
    ]
  }
}

Changes