Skip to main content
All ClickPipes types can be created, updated, and deleted programmatically using the ClickHouse Cloud OpenAPI. This page covers authentication and the available ClickPipes endpoints, with example curl requests for each ClickPipe type.

Authentication

The ClickHouse Cloud API uses HTTP Basic authentication. You need an API key (key ID + key secret) with permissions on the target service. See Managing API keys for instructions on creating one. Set up the following environment variables before running any of the examples below:

Base URL

Endpoints

All ClickPipes endpoints are scoped to a ClickHouse Cloud service: For CDC ClickPipes (Postgres, MySQL, MongoDB), there are additional org-level endpoints for shared CDC infrastructure scaling: For the full request and response schemas for each endpoint, see the API reference.

Examples

List ClickPipes

Get a ClickPipe

Stop or start a ClickPipe

Delete a ClickPipe

GCP workload identity (Private Preview)

Follow the GCP workload identity guide to retrieve the ClickPipes-managed service account and grant it access to your source before using the workload identity examples below.

Creating ClickPipes

The POST /clickpipes request body varies by source type. The examples below show the structure for each supported ClickPipe type. For the authoritative JSON schemas, refer to the API reference.

Kafka

Supported Kafka-compatible sources: kafka, confluent, msk, azureeventhub, redpanda, warpstream, and Private Preview gcmk.
For Google Managed Kafka, grant the workload identity principal roles/managedkafka.client on the cluster project and configure the required Kafka ACLs. Then use this source object without a credentials field:
Google Managed Kafka workload identity requires TLS.

Amazon Kinesis

This example configures Avro with AWS Glue Schema Registry. To decode Protobuf using Glue, set format to Protobuf and retain schemaRegistry. To upload a Protobuf schema instead, set format to Protobuf and provide the base64-encoded .proto file or serialized FileDescriptorSet in protobufSchema; do not include schemaRegistry in that request.

Amazon S3

Google Cloud Storage

serviceAccountKey must be the base64-encoded content of a GCP service account JSON key file.
To use workload identity instead of a service account key, grant the principal roles/storage.objectViewer on the source bucket and use this source object:
For unordered ingestion, also grant the principal roles/pubsub.subscriber and roles/pubsub.viewer on the notification subscription. Set isContinuous to true and use a fully-qualified queueUrl in the form projects/<project-id>/subscriptions/<subscription-id>.

Google Cloud Pub/Sub

The following example uses workload identity. Grant the principal the required Pub/Sub permissions before creating the ClickPipe.

Azure Blob Storage

Postgres CDC

MySQL CDC

MongoDB CDC

BigQuery

serviceAccountFile must be the base64-encoded content of a GCP service account JSON key file.
To use workload identity instead of a service account key, grant the principal the required BigQuery and GCS permissions and use this source object: