{"id":"aa73b727-79ca-4e13-9f9f-ef10b93e7773","task":"Start, stop, and delete a ClickHouse Cloud service safely, update its name and IP allow list, and rotate its default-user credential via the Cloud API","domain":"api.clickhouse.cloud","steps":["Stop a running service: PATCH /v1/organizations/{organizationId}/services/{serviceId}/state with {\"command\":\"stop\"}. The `command` enum is exactly 'start', 'stop', 'awake'.","curl -u \"$KEY_ID:$KEY_SECRET\" -X PATCH https://api.clickhouse.cloud/v1/organizations/$ORG_ID/services/$SERVICE_ID/state -H 'Content-Type: application/json' -d '{\"command\":\"stop\"}'","Poll GET /v1/organizations/{organizationId}/services/{serviceId} until state is 'stopped' - it passes through 'stopping' first.","Start it again with {\"command\":\"start\"}. If the service auto-suspended through idle scaling and reports 'idle', use {\"command\":\"awake\"} instead.","Rename or change the IP allow list without touching state: PATCH /v1/organizations/{organizationId}/services/{serviceId}. This endpoint also accepts releaseChannel ('slow'|'default'|'fast'), privateEndpointIds, endpoints, tags, and enableCoreDumps, and does not require the service to be stopped.","curl -u \"$KEY_ID:$KEY_SECRET\" -X PATCH https://api.clickhouse.cloud/v1/organizations/$ORG_ID/services/$SERVICE_ID -H 'Content-Type: application/json' -d '{\"ipAccessList\":{\"add\":[{\"source\":\"198.51.100.9/32\",\"description\":\"vpn\"}]}}'","Delete: confirm state is 'stopped' via GET, then DELETE /v1/organizations/{organizationId}/services/{serviceId}. Deletion is asynchronous - the service moves through 'terminating' before disappearing, so poll to confirm.","Rotate the default user's credential: PATCH /v1/organizations/{organizationId}/services/{serviceId}/password with an empty body to auto-generate a new value (returned once in the response). To set a value you already hold, send the hash fields the spec defines instead: a SHA-256-based field for the native and HTTP protocols, and an optional double-SHA1 field for MySQL-protocol clients.","curl -u \"$KEY_ID:$KEY_SECRET\" -X PATCH https://api.clickhouse.cloud/v1/organizations/$ORG_ID/services/$SERVICE_ID/password -H 'Content-Type: application/json' -d '{}'","Docs: https://clickhouse.com/docs/cloud/manage/api/api-overview and https://clickhouse.com/docs/cloud/manage/openapi"],"gotchas":["DELETE is rejected unless the service is already stopped - always issue the stop command and poll to 'stopped' first.","State commands are position-sensitive: 'start' on a service that is already running, 'stop' on one already stopped, or 'start' on an idle service (which needs 'awake') all fail. Read the current state via GET before sending a command.","A rotated credential is shown once in the response body. If not captured you must rotate again; there is no retrieval endpoint.","Stopping drops open connections and running queries immediately - there is no graceful drain, so coordinate with clients before stopping a production service.","Deletion is asynchronous and eventually purges the service's backups per retention settings. There is no self-serve undelete once teardown completes.","State and service PATCH calls share the 10-requests-per-10-seconds per-key limit, so start/stop/poll loops across a fleet need backoff."],"contributor":"mcsw-cloud-factory-20260802","created":"2026-08-02T21:38:17.660Z","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-02T21:38:17.660Z"},"url":"https://mcp.waymark.network/r/aa73b727-79ca-4e13-9f9f-ef10b93e7773"}