You can cancel continuous replication by adding the
cancel
field to the JSON request object and
setting the value to true. Note that the structure of the
request must be identical to the original for the cancelation
request to be honoured. For example, if you requested continuous
replication, the cancellation request must also contain the
continuous
field.
For example, the replication request:
POST http://couchdb:5984/_replicate Content-Type: application/json Accept: application/json { "source" : "recipes", "target" : "http://couchdb-remote:5984/recipes", "create_target" : true, "continuous" : true }
Must be canceled using the request:
POST http://couchdb:5984/_replicate Content-Type: application/json Accept: application/json { "cancel" : true, "continuous" : true "create_target" : true, "source" : "recipes", "target" : "http://couchdb-remote:5984/recipes", }
Requesting cancellation of a replication that does not exist results in a 404 error.