ClickHouse Cloud provides an API utilizing OpenAPI that allows you to programmatically manage your account and aspects of your services.
Managing API Keys
This document covers the ClickHouse Cloud API. For database API endpoints, please see Cloud Endpoints API
You can use the API Keys tab on the left menu to create and manage your API keys.
The API Keys page will initially display a prompt to create your first API key as shown below. After your first key is created, you can create new keys using the
New API Keybutton that appears in the top right corner.
To create an API key, specify the key name, permissions for the key, and expiration time, then click
Generate API Key.
The next screen will display your Key ID and Key secret. Copy these values and put them somewhere safe, such as a vault. The values will not be displayed after you leave this screen.
The ClickHouse Cloud API uses HTTP Basic Authentication to verify the validity of your API keys. Here is an example of how to use your API keys to send requests to the ClickHouse Cloud API using
$ curl --silent --user $KEY_ID:$KEY_SECRET https://api.clickhouse.cloud/v1/organizations
- Returning to the API Keys page, you will see the key name, last four characters of the Key ID, permissions, status, expiration date, and creator. You are able to edit the key name, permissions, and expiration from this screen. Keys may also be disabled or deleted form this screen.
Deleting an API key is a permanent action. Any services using the key will immediately lose access to ClickHouse Cloud.
The endpoint docs are here. Use your API Key and API Secret with the base URL