> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-postgresql-tls-support.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get service autoscaling schedule

> **Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Returns the autoscaling schedule for a service. Returns 404 if no schedule has been configured or if the schedule was cleared. Requires the scheduled autoscaling feature to be enabled for the organization.

<span data-endpoint-badge="Beta"><Badge color="blue">Beta</Badge></span>

**Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Returns the autoscaling schedule for a service. Returns 404 if no schedule has been configured or if the schedule was cleared. Requires the scheduled autoscaling feature to be enabled for the organization.


## OpenAPI

````yaml _specs/cloud-openapi.json GET /v1/organizations/{organizationId}/services/{serviceId}/scalingSchedule
openapi: 3.1.2
info:
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
  contact:
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-910487
    email: support@clickhouse.com
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Role Management
  - name: Service
  - name: Backup
  - name: OpenAPI
  - name: Prometheus
  - name: ClickPipes
  - name: ClickStack
  - name: Postgres
paths:
  /v1/organizations/{organizationId}/services/{serviceId}/scalingSchedule:
    get:
      tags:
        - Service
      summary: Get service autoscaling schedule
      description: >-
        **Disclaimer:** This beta endpoint is evolving; the API contract may
        change. <br /><br /> Returns the autoscaling schedule for a service.
        Returns 404 if no schedule has been configured or if the schedule was
        cleared. Requires the scheduled autoscaling feature to be enabled for
        the organization.
      operationId: scalingScheduleGet
      parameters:
        - in: path
          name: organizationId
          description: ID of the organization that owns the service.
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: serviceId
          description: ID of the service.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 200
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
                  result:
                    $ref: '#/components/schemas/ScalingSchedule'
        '400':
          description: >-
            The request cannot be processed due to a client error. Please verify
            your request parameters and try again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 400
                  error:
                    type: string
                    description: Detailed error description.
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
        '500':
          description: >-
            An internal server error has occurred. If this issue persists,
            please contact ClickHouse Cloud support for assistance.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code.
                    example: 500
                  error:
                    type: string
                    description: Detailed error description.
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
components:
  schemas:
    ScalingSchedule:
      properties:
        entries:
          type: array
          description: List of schedule entries.
          items:
            $ref: '#/components/schemas/ScalingScheduleEntry'
        baseConfig:
          $ref: '#/components/schemas/ScalingScheduleBaseConfig'
        activeEntryId:
          description: >-
            ID of the currently-active schedule entry. Absent when no entry is
            active and the base config is in effect.
          type: string
          format: uuid
      required:
        - entries
        - baseConfig
    ScalingScheduleEntry:
      properties:
        id:
          description: Unique identifier for this schedule entry.
          type: string
          format: uuid
        name:
          description: Human-readable label for this schedule entry.
          type: string
        weekdays:
          type: array
          description: >-
            Days of the week this entry applies to. 0 = Sunday, 1 = Monday, …, 6
            = Saturday.
          items:
            type: integer
          minItems: 1
        startHourUtc:
          description: UTC hour (0–23) when this entry becomes active (inclusive).
          type: integer
          minimum: 0
          maximum: 23
        endHourUtc:
          description: >-
            UTC hour (1–24) when this entry deactivates (exclusive). Must differ
            from startHourUtc. Set to 24 to end at midnight. Values less than
            startHourUtc create an overnight window spanning midnight.
          type: integer
          minimum: 1
          maximum: 24
        autoscalingMode:
          description: >-
            Autoscaling mode for this entry. "vertical" runs a fixed replica
            count while memory scales; "horizontal" scales the replica count at
            a fixed per-replica memory. Defaults to "vertical" for entries
            persisted before the mode was exposed.
          type: string
          enum:
            - vertical
            - horizontal
        minReplicaMemoryGb:
          description: >-
            Minimum memory per replica (Gb) during this window. A range in
            vertical; in horizontal it equals maxReplicaMemoryGb (memory is
            fixed while the replica count scales).
          type: number
        maxReplicaMemoryGb:
          description: >-
            Maximum memory per replica (Gb) during this window. A range in
            vertical; in horizontal it equals minReplicaMemoryGb (memory is
            fixed while the replica count scales).
          type: number
        minReplicas:
          description: >-
            Minimum number of replicas during this window. For a horizontal
            entry the replica count scales between minReplicas and maxReplicas;
            for a vertical entry minReplicas and maxReplicas are equal and
            report the fixed replica count (both omitted when the entry stored
            no count).
          type: integer
        maxReplicas:
          description: >-
            Maximum number of replicas during this window. For a horizontal
            entry the replica count scales between minReplicas and maxReplicas;
            for a vertical entry minReplicas and maxReplicas are equal and
            report the fixed replica count (both omitted when the entry stored
            no count).
          type: integer
        idleScaling:
          description: Whether idle scaling is enabled during this window.
          type: boolean
        idleTimeoutMinutes:
          description: Idle timeout in minutes during this window.
          type: integer
        isActiveNow:
          description: >-
            Whether this entry is currently active. Scheduled times are
            indicative — actions are applied on a best-effort basis and may be
            delayed by a few minutes.
          type: boolean
      required:
        - id
        - name
        - weekdays
        - startHourUtc
        - endHourUtc
        - autoscalingMode
        - isActiveNow
    ScalingScheduleBaseConfig:
      properties:
        autoscalingMode:
          description: >-
            Autoscaling mode applied when no schedule entry is active.
            "vertical" runs a fixed replica count while memory scales;
            "horizontal" scales the replica count at a fixed per-replica memory.
          type: string
          enum:
            - vertical
            - horizontal
        minReplicaMemoryGb:
          description: Minimum memory per replica (Gb) when no schedule entry is active.
          type: number
        maxReplicaMemoryGb:
          description: Maximum memory per replica (Gb) when no schedule entry is active.
          type: number
        minReplicas:
          description: Minimum number of replicas when no schedule entry is active.
          type: integer
        maxReplicas:
          description: Maximum number of replicas when no schedule entry is active.
          type: integer
        idleScaling:
          description: Whether idle scaling is enabled when no schedule entry is active.
          type: boolean
        idleTimeoutMinutes:
          description: Idle timeout in minutes when no schedule entry is active.
          type: integer
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Use key ID and key secret obtained in ClickHouse Cloud console:
        https://clickhouse.com/docs/cloud/manage/openapi

````