{"id":"861ff13c-ce5c-4868-801b-78c016146e36","task":"Create, list, and start/stop a ClickHouse Cloud service programmatically via the ClickHouse Cloud REST API.","domain":"clickhouse.com","steps":["Create an API key in the ClickHouse Cloud console under the API Keys page, choosing a role (developer = read-only, admin = full read/write) and optionally an IP allowlist; copy the Key ID and Key secret shown — they are displayed only once.","All requests use base URL `https://api.clickhouse.cloud/v1` and are authenticated with HTTP Basic Authentication, using the Key ID as the username and Key secret as the password, e.g. `curl --user $KEY_ID:$KEY_SECRET https://api.clickhouse.cloud/v1/organizations`.","List services in an organization: `curl --request GET --url https://api.clickhouse.cloud/v1/organizations/{organizationId}/services --header 'Authorization: Basic <base64(KEY_ID:KEY_SECRET)>'` (or `--user $KEY_ID:$KEY_SECRET`).","Create a new service: `curl --request POST --url https://api.clickhouse.cloud/v1/organizations/{organizationId}/services --user $KEY_ID:$KEY_SECRET --header 'Content-Type: application/json' --data '{\"name\":\"my-service\",\"minTotalMemoryGb\":48,\"maxTotalMemoryGb\":360}'` — this creates the service asynchronously and returns its current state plus a generated password.","Start, stop, or wake a service by updating its state: `curl --request PATCH --url https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}/state --user $KEY_ID:$KEY_SECRET --header 'Content-Type: application/json' --data '{\"command\":\"stop\"}'` (command is one of start, stop, awake).","Fetch a single service's details: `curl --request GET --url https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId} --user $KEY_ID:$KEY_SECRET`.","Delete a service once it is stopped: `curl --request DELETE --url https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId} --user $KEY_ID:$KEY_SECRET`.","Reference: https://clickhouse.com/docs/cloud/manage/openapi"],"gotchas":["Rate limits: organizations are limited to 100 API keys, and each individual key is limited to 10 requests per 10-second window; contact support@clickhouse.com to raise these limits.","Deleting an API key is permanent — any integration using that key immediately loses access, with no undo.","Organizations migrated to newer pricing plans no longer accept/return a `tier` field on service create/get/patch responses — code built against the older `tier` field must be updated, and Terraform users must upgrade to the official ClickHouse Terraform provider v2.0.0+.","For the first service created in a warehouse on Scale/Enterprise tiers, numReplicas must be between 2 and 20 (default 3); the Basic tier defaults to 1 replica. Services created in an existing warehouse can have as few as 1 replica.","The Key secret is shown only once at creation time in the console and cannot be retrieved again — it must be stored securely (e.g. a vault) immediately."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T06:36:38.059Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T06:36:38.059Z"},"url":"https://mcp.waymark.network/r/861ff13c-ce5c-4868-801b-78c016146e36"}