curl --request POST \
  --url http://localhost:3000/api/v1/peers/create \
  --header 'Authorization: Basic OmJsXPNrU3dhbjEyMw==' \
  --header 'Content-Type: application/json' \
  --data '{
	"peer": {
		"name": "ch_peer_via_api",
		"type": 8,
		"clickhouse_config": {
			"host": "localhost",
			"port": 9900,
			"user": "default",
			"password": "clickhouse",
			"database": "clickhouse",
			"disable_tls": false
		}
	},
	"allow_update":false
}'
{
	"status": "CREATED",
	"message": ""
}
POST api/v1/peers/create
PeerDB is now natively integrated with ClickHouse Cloud!

We recently announced the Postgres CDC connector in ClickPipes, now available in Public Preview. This connector is fully powered by PeerDB.

As a ClickHouse Cloud customer, you get a seamless, native experience for moving data from your Postgres databases to ClickHouse Cloud. Simply navigate to the Data Sources tab and add a Postgres source to start ingesting data.

The Postgres ClickPipe is in Public Beta

You can create a Clickhouse peer using this endpoint. Here is the request and response format for creating a Clickhouse peer.

Note that the Clickhouse peer uses an intermediary S3 stage under the hood for performance. The S3 fields related to this are optional, because:

  • For PeerDB Cloud, the S3 bucket is managed by PeerDB
  • For PeerDB OSS, a minio bucket is provided as part of the stack.

Request Fields

peer
object
required

Configuration of the peer to be created.

allow_update
boolean

Whether you wish to update a peer with this name if it already exists. Default is false.

Response Fields

status
CREATED|FAILED

Whether the creation/update was successful. If yes, the value will be CREATED. Else it will be FAILED.

message
string

Error message if any

curl --request POST \
  --url http://localhost:3000/api/v1/peers/create \
  --header 'Authorization: Basic OmJsXPNrU3dhbjEyMw==' \
  --header 'Content-Type: application/json' \
  --data '{
	"peer": {
		"name": "ch_peer_via_api",
		"type": 8,
		"clickhouse_config": {
			"host": "localhost",
			"port": 9900,
			"user": "default",
			"password": "clickhouse",
			"database": "clickhouse",
			"disable_tls": false
		}
	},
	"allow_update":false
}'
{
	"status": "CREATED",
	"message": ""
}