Docs Home → MongoDB Cluster-to-Cluster Sync
pause

On this page
Description
Pauses the current synchronization operation.
Requirement
To use the pause
endpoint, mongosync
must be in the RUNNING
state.
Request
POST /api/v1/pause
Request Body Parameters
This endpoint does not use HTTP request body parameters. However, you
must specify the --data
option with an empty object { }
.
Response
Field | Type | Description |
---|---|---|
success | boolean | When the request is successful, this value is true . |
error | string | If an error occurred, indicates the name of the error. This field
is omitted from the response when success is true . |
errorDescription | string | Detailed description of the error that occurred. This field is
omitted from the response when success is true . |
Example
The following example pauses the current synchronization operation.
Request
curl localhost:27182/api/v1/pause -XPOST --data '{ }'
Response
{"success":true}
Behavior
If the
pause
request is successful,mongosync
enters thePAUSED
state.If you plan to pause synchronization for an extended period of time, increase the size of the replica set oplog in the source cluster. To learn more, see Frequently Asked Questions.