9.5. POST /_replicate

9.5.1. Replication Operation
9.5.2. Specifying the Source and Target Database
9.5.3. Single Replication
9.5.4. Continuous Replication
9.5.5. Canceling Continuous Replication
MethodPOST /_replicate
Request Replication specification
Response Welcome message and version
Admin Privileges Requiredno
Return Codes
200 Replication request successfully completed
202 Continuous replication request has been accepted
404 Either the source or target DB is not found
500 JSON specification was invalid

Request, configure, or stop, a replication operation.

The specification of the replication request is controlled through the JSON content of the request. The JSON should be an object with the fields defining the source, target and other options. The fields of the JSON request are shown in the table below:

Table 9.3.  Replication Settings

FieldDescription
cancel (optional) Cancels the replication
continuous (optional) Configure the replication to be continuous
create_target (optional) Creates the target database
doc_ids (optional) Array of document IDs to be synchronized
proxy (optional) Address of a proxy server through which replication should occur
source Source database name or URL
target Target database name or URL