Skip to main content

How to start, stop and resume a Cloud service using the ClickHouse API and cURL

· One min read


How can a ClickHouse Cloud service be started, stopped and resumed using API endpoints?


  1. To wake up/resume a Cloud service from an idle state, you can ping the instance:
curl -X GET
  1. To stop a Cloud service, use the /state endpoint along with the stop command. The syntax looks like:
curl -X PATCH<org_uuid>/services/<service_uuid>/state -u <key_id>:<key_secret> -H "Content-Type: application/json" -d ''{"command": "<stop|start>"}''

For example, the following command stops the 2e2124ca-c5ac-459d-a6f2-abc123549d2a service:

curl -X PATCH -u abc123:ABC123 -H "Content-Type: application/json" -d '{"command": "stop"}'

The output looks like:

  1. To start the service again, use the start command:
curl -X PATCH -u abc123:ABC123 -H "Content-Type: application/json" -d '{"command": "start"}'

Here are the various states that a service can be in:


A Cloud service that is "idle" is considered started, so a start command will not resume/wake it up. Use the ping endpoint shown in Step 1 to wake up a service.