XDCR API

The XDCR REST API is used to manage Cross Datacenter Replication (XDCR) operations.

Description

Cross Datacenter Replication (XDCR) configuration automatically replicates data between clusters and between data buckets. When using XDCR, the source and destination clusters are specified. A source cluster is the cluster from where you want to copy data. A destination cluster is the cluster where you want the replica data to be stored. When configuring replication, specify your selections for an individual cluster using Couchbase web console. XDCR replicates data between specific buckets and specific clusters and replications can be configured to be either uni-directional or bi-directional. Uni-directional replication means that XDCR replicates from a source to a destination. Bi-directional replication means that XDCR replicates from a source to a destination and also replicates from the destination to the source.

Table 1. XDCR endpoints
HTTP method URI path Description
GET /pools/default/remoteClusters Retrieves the destination cluster reference
POST /pools/default/remoteClusters Creates a reference to the destination cluster
PUT /pools/default/remoteClusters/[UUID] Modifies the destination cluster reference
DELETE /pools/default/remoteClusters/[UUID] Deletes the reference to the destination cluster.
GET /pools/default/certificate Retrieves the certificate from the cluster.
POST /controller/regenerateCertificate Regenerates a certificate on a destination cluster.
DELETE /controller/cancelXDCR/[replication_id]/[source_bucket]/[destination_bucket] Deletes the replication.
GET, POST /settings/replications/ Global setting supplied to all replications for a cluster.
GET, POST /settings/replications/[replication_id] Settings for a specific replication for a bucket.
GET /pools/default/buckets/[bucket_name]/stats/[destination_endpoint] Retrieves bucket statistics.