A newer version of this documentation is available.

View Latest

Creating XDCR replications

To create an XDCR replication, use the POST /controller/createReplication HTTP method and URI.


Data replication occurs from a source cluster to a destination cluster. Once a replication is created, data replication between clusters automatically begins.

HTTP method and URI

POST /controller/createReplication


Curl request syntax:

curl -v -X POST -u [admin]:[password]
  -d fromBucket=[bucket-name]
  -d toCluster=[cluster-name]
  -d toBucket=[bucket-name]
  -d replicationType=continuous
  -d type=[capi | xmem]
The type values, capi and xmem, are represented by version1 and version2 in the web console. Default: xmem. Because xmem is the default for Type, this parameter is not required when creating xmem replications. The replicationType value is always continuous.


Curl request example:

curl -v -X POST -u Administrator:password1 \ \
  -d 'fromBucket=beer-sample' \
  -d 'toCluster=remote1' \
  -d 'toBucket=remote_beer' \
  -d 'replicationType=continuous' \
  -d 'type=capi'

Raw HTTP request:

Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZDE=
User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
Accept: */*
Content-Length: 126
Content-Type: application/x-www-form-urlencoded


If the replication is created, data replication immediately begins replicating data from the source to destination cluster and a response similar to the following is returned.

  "id": "9eee38236f3bf28406920213d93981a3/beer-sample/remote_beer"

The unique document ID returned in the JSON is a reference that is used to delete the replication.