ClickHouse Cloud API

The ClickHouse Cloud control-plane REST API — 148 operations across 86 paths for organizations, services, users and roles, API keys, backups, ClickPipes, ClickStack observability, Managed Postgres, UDFs, Prometheus metrics and billing. Authenticated with HTTP Basic using an API key ID and secret. The OpenAPI 3.1.2 description is served live and unauthenticated from the API root itself, and is advertised as service-desc in the RFC 9727 api-catalog at https://clickhouse.com/.well-known/api-catalog.

Operations 148

GET /v1/organizations Get list of available organizations #
GET /v1/organizations/{organizationId} Get organization details #
PATCH /v1/organizations/{organizationId} Update organization details #
GET /v1/organizations/{organizationId}/prometheus Get organization metrics #
GET /v1/organizations/{organizationId}/prometheus/discovery List Prometheus scrape targets #
GET /v1/organizations/{organizationId}/roles List all available roles for an organization #
POST /v1/organizations/{organizationId}/roles Create a new role #
GET /v1/organizations/{organizationId}/roles/{roleId} Get role details #
PATCH /v1/organizations/{organizationId}/roles/{roleId} Update a role #
DELETE /v1/organizations/{organizationId}/roles/{roleId} Delete a role #
GET /v1/organizations/{organizationId}/quotas Get organization quotas #
GET /v1/organizations/{organizationId}/quotas/{quotaCode} Get organization quota details #
GET /v1/organizations/{organizationId}/serviceProfiles List available service profiles #
GET /v1/organizations/{organizationId}/services List of organization services #
POST /v1/organizations/{organizationId}/services Create new service #
GET /v1/organizations/{organizationId}/services/{serviceId} Get service details #
PATCH /v1/organizations/{organizationId}/services/{serviceId} Update service basic details #
DELETE /v1/organizations/{organizationId}/services/{serviceId} Delete service #
GET /v1/organizations/{organizationId}/services/{serviceId}/privateEndpointConfig Get private endpoint configuration #
GET /v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint Get the service query endpoint for a given instance #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint Delete the service query endpoint for a given instance #
POST /v1/organizations/{organizationId}/services/{serviceId}/serviceQueryEndpoint Upsert the service query endpoint for a given instance #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/state Update service state #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/scaling Update service auto scaling settings #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/replicaScaling Update service auto scaling settings #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/password Update service password #
POST /v1/organizations/{organizationId}/services/{serviceId}/privateEndpoint Create a private endpoint #
GET /v1/organizations/{organizationId}/services/{serviceId}/prometheus Get service metrics #
GET /v1/organizations/{organizationId}/services/{serviceId}/scalingSchedule Get service autoscaling schedule #
POST /v1/organizations/{organizationId}/services/{serviceId}/scalingSchedule Create or replace service autoscaling schedule #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/scalingSchedule Delete service scheduled scaling #
GET /v1/organizations/{organizationId}/services/{serviceId}/upgradeWindow Get service upgrade window #
PUT /v1/organizations/{organizationId}/services/{serviceId}/upgradeWindow Set service upgrade window #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/upgradeWindow Delete service upgrade window #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings List ClickHouse settings #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings Update ClickHouse settings #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings/schema Get ClickHouse settings schema #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings/{settingName} Get ClickHouse setting #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/clickhouseSettings/{settingName} Reset ClickHouse setting to default #
GET /v1/organizations/{organizationId}/services/{serviceId}/backups List of service backups #
GET /v1/organizations/{organizationId}/services/{serviceId}/backups/{backupId} Get backup details #
GET /v1/organizations/{organizationId}/services/{serviceId}/backupConfiguration Get service backup configuration #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/backupConfiguration Update service backup configuration #
GET /v1/organizations/{organizationId}/services/{serviceId}/backupBucket Get service backup bucket #
POST /v1/organizations/{organizationId}/services/{serviceId}/backupBucket Create service backup bucket #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/backupBucket Update service backup bucket #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/backupBucket Delete service backup bucket #
GET /v1/organizations/{organizationId}/keys Get list of all keys #
POST /v1/organizations/{organizationId}/keys Create key #
GET /v1/organizations/{organizationId}/keys/{keyId} Get key details #
PATCH /v1/organizations/{organizationId}/keys/{keyId} Update key #
DELETE /v1/organizations/{organizationId}/keys/{keyId} Delete key #
GET /v1/organizations/{organizationId}/members List organization members #
GET /v1/organizations/{organizationId}/members/{userId} Get member details #
PATCH /v1/organizations/{organizationId}/members/{userId} Update organization member #
DELETE /v1/organizations/{organizationId}/members/{userId} Remove an organization member #
GET /v1/organizations/{organizationId}/invitations List all invitations #
POST /v1/organizations/{organizationId}/invitations Create an invitation #
GET /v1/organizations/{organizationId}/invitations/{invitationId} Get invitation details #
DELETE /v1/organizations/{organizationId}/invitations/{invitationId} Delete organization invitation #
GET /v1/organizations/{organizationId}/activities List of organization activities #
GET /v1/organizations/{organizationId}/activities/{activityId} Organization activity #
GET /v1/organizations/{organizationId}/usageCost Get organization usage costs #
GET /v1/organizations/{organizationId}/activeBalances Get organization active prepaid balances #
GET /v1/organizations/{organizationId}/creditBalances Get organization active credit balances #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickpipes List ClickPipes #
POST /v1/organizations/{organizationId}/services/{serviceId}/clickpipes Create ClickPipe #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/context Get ClickPipes service context #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId} Get ClickPipe #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId} Update ClickPipe #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId} Delete ClickPipe #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings Get ClickPipe settings #
PUT /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/settings Update ClickPipe settings #
POST /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/schemaDiscovery Discover ClickPipe source schema #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/scaling Update ClickPipe scaling #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/clickpipes/{clickPipeId}/state Update ClickPipe state #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickpipesCdcScaling Get CDC ClickPipes scaling #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/clickpipesCdcScaling Update CDC ClickPipes scaling #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/dashboards ClickStack: List Dashboards #
POST /v1/organizations/{organizationId}/services/{serviceId}/clickstack/dashboards ClickStack: Create Dashboard #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/dashboards/{clickStackDashboardId} ClickStack: Get Dashboard #
PUT /v1/organizations/{organizationId}/services/{serviceId}/clickstack/dashboards/{clickStackDashboardId} ClickStack: Update Dashboard #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/clickstack/dashboards/{clickStackDashboardId} ClickStack: Delete Dashboard #
POST /v1/organizations/{organizationId}/services/{serviceId}/clickstack/dashboards/validate ClickStack: Validate Dashboard #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/alerts ClickStack: List Alerts #
POST /v1/organizations/{organizationId}/services/{serviceId}/clickstack/alerts ClickStack: Create Alert #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/sources ClickStack: List Sources #
POST /v1/organizations/{organizationId}/services/{serviceId}/clickstack/sources ClickStack: Create Source #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/sources/{clickStackSourceId} ClickStack: Get Source #
PUT /v1/organizations/{organizationId}/services/{serviceId}/clickstack/sources/{clickStackSourceId} ClickStack: Update Source #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/clickstack/sources/{clickStackSourceId} ClickStack: Delete Source #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/alerts/{clickStackAlertId} ClickStack: Get Alert #
PUT /v1/organizations/{organizationId}/services/{serviceId}/clickstack/alerts/{clickStackAlertId} ClickStack: Update Alert #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/clickstack/alerts/{clickStackAlertId} ClickStack: Delete Alert #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/webhooks ClickStack: List Webhooks #
POST /v1/organizations/{organizationId}/services/{serviceId}/clickstack/webhooks ClickStack: Create Webhook #
PUT /v1/organizations/{organizationId}/services/{serviceId}/clickstack/webhooks/{clickStackWebhookId} ClickStack: Update Webhook #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/clickstack/webhooks/{clickStackWebhookId} ClickStack: Delete Webhook #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/roles ClickStack: List Roles #
POST /v1/organizations/{organizationId}/services/{serviceId}/clickstack/roles ClickStack: Create Role #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/roles/{clickStackRoleId} ClickStack: Get Role #
PUT /v1/organizations/{organizationId}/services/{serviceId}/clickstack/roles/{clickStackRoleId} ClickStack: Update Role #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/clickstack/roles/{clickStackRoleId} ClickStack: Delete Role #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/saved-searches ClickStack: List Saved Searches #
POST /v1/organizations/{organizationId}/services/{serviceId}/clickstack/saved-searches ClickStack: Create Saved Search #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickstack/saved-searches/{clickStackSavedSearchId} ClickStack: Get Saved Search #
PUT /v1/organizations/{organizationId}/services/{serviceId}/clickstack/saved-searches/{clickStackSavedSearchId} ClickStack: Update Saved Search #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/clickstack/saved-searches/{clickStackSavedSearchId} ClickStack: Delete Saved Search #
POST /v1/organizations/{organizationId}/postgres Create new Postgres service #
GET /v1/organizations/{organizationId}/postgres List of organization Postgres services #
GET /v1/organizations/{organizationId}/postgres/prometheus Get organization PostgreSQL metrics #
GET /v1/organizations/{organizationId}/postgres/{postgresId} Get PostgreSQL service details #
DELETE /v1/organizations/{organizationId}/postgres/{postgresId} Delete a PostgreSQL service #
PATCH /v1/organizations/{organizationId}/postgres/{postgresId} Update a PostgreSQL service #
GET /v1/organizations/{organizationId}/postgres/{postgresId}/caCertificates Get Postgres CA certs #
POST /v1/organizations/{organizationId}/postgres/{postgresId}/restoredService Restore a Postgres service #
PATCH /v1/organizations/{organizationId}/postgres/{postgresId}/password Update Postgres superuser password #
PATCH /v1/organizations/{organizationId}/postgres/{postgresId}/state Update Postgres service state #
POST /v1/organizations/{organizationId}/postgres/{postgresId}/readReplica Create a read replica for a Postgres service #
GET /v1/organizations/{organizationId}/postgres/{postgresId}/config Get PostgreSQL service configuration #
POST /v1/organizations/{organizationId}/postgres/{postgresId}/config Replace Postgres service configuration #
PATCH /v1/organizations/{organizationId}/postgres/{postgresId}/config Update Postgres service configuration #
GET /v1/organizations/{organizationId}/postgres/{postgresId}/prometheus Get PostgreSQL service metrics #
GET /v1/organizations/{organizationId}/postgres/{postgresId}/metrics Get Postgres time-series metrics #
GET /v1/organizations/{organizationId}/postgres/{postgresId}/slowQueryPatterns List Postgres slow query patterns #
GET /v1/organizations/{organizationId}/postgres/{postgresId}/slowQueryPatterns/{queryId} Get a Postgres slow query pattern with recent executions #
GET /v1/organizations/{organizationId}/postgres/{postgresId}/logs List Postgres server logs #
GET /v1/organizations/{organizationId}/privateEndpointConfig Get private endpoint configuration for region within cloud provider for an organization #
POST /v1/organizations/{organizationId}/byocInfrastructure Create BYOC Infrastructure #
DELETE /v1/organizations/{organizationId}/byocInfrastructure/{byocInfrastructureId} Remove a BYOC infrastructure #
PATCH /v1/organizations/{organizationId}/byocInfrastructure/{byocInfrastructureId} Update BYOC Infrastructure #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints List reverse private endpoints #
POST /v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints Create reverse private endpoint #
GET /v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints/{reversePrivateEndpointId} Get reverse private endpoint #
DELETE /v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints/{reversePrivateEndpointId} Delete reverse private endpoint #
PATCH /v1/organizations/{organizationId}/services/{serviceId}/clickpipesReversePrivateEndpoints/{reversePrivateEndpointId} Update reverse private endpoint #
PUT /v1/organizations/{organizationId}/udfs/{functionName}/attachments/{serviceId} Attach UDF to service #
GET /v1/organizations/{organizationId}/udfs/{functionName}/attachments/{serviceId} Get UDF attachment #
DELETE /v1/organizations/{organizationId}/udfs/{functionName}/attachments/{serviceId} Detach UDF from service #
GET /v1/organizations/{organizationId}/udfs/{functionName}/attachments List UDF attachments #
POST /v1/organizations/{organizationId}/udfs Create UDF #
GET /v1/organizations/{organizationId}/udfs List UDFs #
DELETE /v1/organizations/{organizationId}/udfs/{functionName} Delete UDF #
GET /v1/organizations/{organizationId}/udfs/{functionName} Get UDF #
POST /v1/organizations/{organizationId}/udfUploads/url Create UDF upload URL #
POST /v1/organizations/{organizationId}/udfs/{functionName}/versions Create UDF version #
GET /v1/organizations/{organizationId}/udfs/{functionName}/versions List UDF versions #
DELETE /v1/organizations/{organizationId}/udfs/{functionName}/versions/{version} Delete UDF version #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/clickhouse-cloud-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

clickhouse-cloud-api-openapi.json Raw ↑
{
  "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-1107336",
      "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": "API keys"
    },
    {
      "name": "Prometheus"
    },
    {
      "name": "ClickPipes"
    },
    {
      "name": "ClickStack"
    },
    {
      "name": "Postgres"
    },
    {
      "name": "UDF"
    }
  ],
  "paths": {
    "/v1/organizations": {
      "get": {
        "summary": "Get list of available organizations",
        "description": "Returns a list with a single organization associated with the API key in the request.",
        "operationId": "organizationGetList",
        "parameters": [],
        "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": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Organization"
                      }
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Organization"
        ]
      }
    },
    "/v1/organizations/{organizationId}": {
      "get": {
        "summary": "Get organization details",
        "description": "Returns details of a single organization. In order to get the details, the auth key must belong to the organization.",
        "operationId": "organizationGet",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "description": "ID of the requested organization.",
            "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/Organization"
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Organization"
        ]
      },
      "patch": {
        "summary": "Update organization details",
        "description": "Updates organization fields. Requires ADMIN auth key role.",
        "operationId": "organizationUpdate",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "description": "ID of the organization to update.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationPatchRequest"
              }
            }
          }
        },
        "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/Organization"
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Organization"
        ]
      }
    },
    "/v1/organizations/{organizationId}/prometheus": {
      "get": {
        "summary": "Get organization metrics",
        "description": "Deprecated. Use the Prometheus service discovery endpoint (/v1/organizations/{organizationId}/prometheus/discovery) instead. This endpoint is not available for new organizations; contact ClickHouse support to request access. Returns Prometheus metrics for the services in an organization that the caller is authorized to view. Services the caller lacks view access to are omitted.",
        "operationId": "organizationPrometheusGet",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "description": "ID of the requested organization.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "query",
            "name": "filtered_metrics",
            "description": "Return a filtered list of Prometheus metrics.",
            "schema": {
              "type": "string",
              "format": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": true,
        "tags": [
          "Prometheus"
        ]
      }
    },
    "/v1/organizations/{organizationId}/prometheus/discovery": {
      "get": {
        "summary": "List Prometheus scrape targets",
        "description": "**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns one Prometheus scrape target per service in the organization, in the [HTTP service discovery](https://prometheus.io/docs/prometheus/latest/http_sd/) (`http_sd`) format. Only services the API key is authorized to view are included; services that are being deleted or have been deleted are omitted.\n\nPoint an [`http_sd_configs`](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config) job at this endpoint to discover and scrape all services in the organization automatically. Prometheus refreshes the target list on every discovery poll, so newly created and deleted services are picked up without configuration changes.\n\nDiscovered targets scrape with `filtered_metrics=true` by default; pass `?filtered_metrics=false` to this endpoint to discover unfiltered targets. See the [Prometheus integration guide](https://clickhouse.com/docs/integrations/prometheus) for more on the exported metrics.",
        "operationId": "organizationPrometheusDiscoveryGet",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "description": "ID of the requested organization.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "query",
            "name": "filtered_metrics",
            "description": "Whether discovered targets scrape a filtered list of metrics. Sets the filtered_metrics parameter on each discovered target. Defaults to true.",
            "schema": {
              "type": "string",
              "format": "boolean"
            },
            "example": "true"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PrometheusDiscoveryTargetGroup"
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Prometheus"
        ],
        "x-badges": [
          {
            "name": "Beta",
            "position": "after"
          }
        ]
      }
    },
    "/v1/organizations/{organizationId}/roles": {
      "get": {
        "summary": "List all available roles for an organization",
        "description": "Returns all available roles (system + custom) for an organization.",
        "operationId": "organizationRolesGetList",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "description": "ID of the requested organization.",
            "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": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RBACRole"
                      }
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Role Management"
        ]
      },
      "post": {
        "summary": "Create a new role",
        "description": "Creates a new custom role for an organization with specified policies and actors.",
        "operationId": "organizationRolePost",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "description": "ID of the requested organization.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleCreateRequest"
              }
            }
          }
        },
        "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/RBACRole"
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Role Management"
        ]
      }
    },
    "/v1/organizations/{organizationId}/roles/{roleId}": {
      "get": {
        "summary": "Get role details",
        "description": "Returns details for a specific role.",
        "operationId": "organizationRoleGet",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "description": "ID of the requested organization.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "roleId",
            "description": "ID of the requested role.",
            "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/RBACRole"
                    }
                  }
                }
              }
            }
          },
          "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"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Role Management"
        ]
      },
      "patch": {
        "summary": "Update a role",
        "description": "Updates an existing custom role. System roles cannot be updated. All fields are optional - only provided fields will be updated.",
        "operationId": "organizationRolePatch",
        "parameters": [
          {
            "in": "path",
            "name": "organizationId",
            "description": "ID of the requested organization.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "in": "path",
            "name": "roleId",
            "description": "ID of the requested role.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleUpdateRequest"
              }
            }
          }
        },
        "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/RBACRole"
                    }
                  }
                }
              }
            }
          },
          "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": {
                      "typ

# --- truncated at 32 KB (1217 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/clickhouse/refs/heads/main/openapi/clickhouse-cloud-api-openapi.json