Postgres

Update Postgres service state

Changed on

Initiate a process for a Postgres service:

  • restart: Initiates a service restart
  • promote: Promotes a read replica to primary
  • switchover: Switch a primary over to a standby. If there is no standby, replace the primary with a newly provisioned server and switch over to it.
patch/v1/organizations/{organizationId}/postgres/{postgresId}/state

Request

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

Path parameters

organizationId, string uuid required

ID of the organization that owns the Postgres service.

postgresId, string uuid required
Example:f71df78e-ddad-82d0-8dfa-abbec741b82e

ID of the requested Postgres service.

Request body

PostgresServiceSetState required
command, 'restart' | 'promote' | 'switchover'

Postgres status, which initiates a process.

Response

Successful response

object required
status, number

HTTP status code.

requestId, string uuid

Unique id assigned to every request. UUIDv4

result, PostgresService

Example response

{
  "status": 200,
  "result": {
    "size": "m8gd.large",
    "tags": [
      {
        "key": "Environment",
        "value": "staging"
      }
    ],
    "ipAccessList": [
      {
        "source": "203.0.113.0/24",
        "portRange": "5432"
      }
    ],
    "id": "f71df78e-ddad-82d0-8dfa-abbec741b82e",
    "createdAt": "2026-03-26T20:51:16.384Z",
    "earliestRestoreTime": "2026-03-19T20:51:16Z"
  }
}

Changes

    • info

      removed the c3-standard-lssd-176 enum value from the result/size response property for the response status

    • info

      removed the c3-standard-lssd-22 enum value from the result/size response property for the response status

    • info

      removed the c3-standard-lssd-4 enum value from the result/size response property for the response status

    189 more changes in this revision