> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to check your ClickHouse Cloud service state

> Learn how to use the ClickHouse Cloud API to check if your service is stopped, idle, or running without waking it up.

{frontMatter.description}

<h2 id="how-to-check-your-clickhouse-cloud-service-state">
  How to Check Your ClickHouse Cloud Service State
</h2>

How do I check my ClickHouse Cloud Service state? I want to check if the Service is stopped, idle, or running, but I don't want to wake the Service up in doing so.

<h2 id="answer">
  Answer
</h2>

The [ClickHouse Cloud API](/docs/products/cloud/features/admin-features/api/api-overview) is great for checking the status of a cloud service. You need to create an API Key in your service before you can use the Cloud API. You can do this in ClickHouse Cloud [clickhouse.cloud](https://console.clickhouse.cloud):

* [API Overview](/docs/products/cloud/features/admin-features/api/api-overview)
* [Swagger](/docs/products/cloud/api-reference/organization/get-list-of-available-organizations)

1. To check the status of a service, run the following. Make sure to replace `Key-ID` and `Key-Secret` with your respective details:

   ```shell theme={null}
   curl --user '[Key-ID]:[Key-Secret]' https://api.clickhouse.cloud/v1/organizations/[Org-ID]/services/[Service-ID]
   ```

   This will output something like:

   ```json theme={null}
   result":{"id":"[Service-ID]","name":"[Service-Name]","provider":"aws","region":"us-east-1","state":"**idle**","endpoints":[{"protocol":"nativesecure","host":"[Connect-URL]","port":9440},{"protocol":"https","host":"[Connect-URL]","port":8443}],"tier":"development","idleScaling":true,"idleTimeoutMinutes":15,"ipAccessList":[{"source":"[my-IP]","description":"[my-IP-name]"}],"createdAt":"2023-04-13T23:47:47Z"},"status":200}
   ```

2. You can use the [JQ utility](https://jqlang.github.io/jq/) to extract the `state` key:

   ```shell theme={null}
   curl --user '[Key-ID]:[Key-Secret]' https://api.clickhouse.cloud/v1/organizations/[Org-ID]/services/[Service-ID] | jq '.state'
   ```

   This will output something like:

   ```json theme={null}
   **idle**
   ```

3. Running the same command against an actively running service will output:

   ```json theme={null}
   **running**
   ```
