Service

Create or replace service autoscaling schedule

Creates or fully replaces the autoscaling schedule for a service. Pass an empty entries array to clear the schedule — a subsequent GET will return 404, and the response will contain an empty baseConfig (all fields absent). The base scaling config (applied when no entry is active) is managed separately via the replicaScaling endpoint. Gen 2 (v2-default) services use a fixed size and cannot idle. An entry may leave out fields it takes from the base config, but each entry combined with those fields must have equal minReplicaMemoryGb and maxReplicaMemoryGb, a fixed replica count (numReplicas, or equal minReplicas and maxReplicas), and idling off; otherwise the request is rejected. Available on the Scale and Enterprise plans; Basic organizations get a 403.

post/v1/organizations/{organizationId}/services/{serviceId}/scalingSchedule

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.

Request body

ScalingSchedulePostRequest required
entries, ScalingScheduleEntryRequest[] required

List of schedule entries. Pass an empty array to clear the schedule.

Example request

{
  "entries": [
    {
      "name": "Business hours",
      "weekdays": [
        1,
        2,
        3,
        4,
        5
      ],
      "startHourUtc": 9,
      "endHourUtc": 17,
      "autoscalingMode": "vertical",
      "minReplicaMemoryGb": 16,
      "maxReplicaMemoryGb": 16,
      "numReplicas": 3,
      "minReplicas": 2,
      "maxReplicas": 3
    }
  ]
}

Response

Successful response

object required
status, number

HTTP status code.

requestId, string uuid

Unique id assigned to every request. UUIDv4

result, ScalingSchedule

Example response

{
  "status": 200
}

Changes

No recorded changes to this operation across all 35 revisions of this API.