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 Admin Role

GET

/pools/default/remoteClusters

Retrieves the destination cluster reference

Full, Cluster, Replication

POST

/pools/default/remoteClusters

Creates a reference to the destination cluster

Full, Cluster, Replication

POST

/pools/default/remoteClusters/[Name]

Modifies the destination cluster reference.

Full, Cluster, Replication

DELETE

/pools/default/remoteClusters/[Name]

Deletes the reference to the destination cluster.

Full, Cluster, Replication

GET

/pools/default/certificate

Retrieves the certificate from the cluster.

Full, Cluster

POST

/controller/regenerateCertificate

Regenerates a certificate on a destination cluster.

Full, Cluster

DELETE

/controller/cancelXDCR/[replication_id]

Deletes the replication.

Full, Cluster

GET, POST

/settings/replications/

Global setting supplied to all replications for a cluster.

Full, Cluster

GET, POST

/settings/replications/[replication_id]

Settings for a specific replication for a bucket.

Full, Cluster

GET

/pools/default/buckets/@xdcr[bucket_name]/ \ stats/[destination_endpoint]_

Retrieves bucket statistics.

Full, Cluster, Replication