POST api/v1/peers/create

This endpoint is used to create a peer. Peers represent data stores between which you can move data using a mirror.

Peers in this documentation:

  1. Postgres peer
  2. Clickhouse peer

Postgres Peer

Here is the request and response format for creating a Postgres peer. SSH tunneling is optional for peer creation.

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

Clickhouse peer

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