File tree Expand file tree Collapse file tree 5 files changed +119
-1
lines changed Expand file tree Collapse file tree 5 files changed +119
-1
lines changed Original file line number Diff line number Diff line change
1
+ curl localhost:27182/api/v1/start -XPOST
2
+ --data '
3
+ {
4
+ "source": "cluster0",
5
+ "destination": "cluster1"
6
+ } '
Original file line number Diff line number Diff line change
1
+ {" success" :true}
Original file line number Diff line number Diff line change @@ -7,5 +7,6 @@ Reference
7
7
.. toctree::
8
8
:titlesonly:
9
9
10
+ /reference/api
10
11
/reference/mongosync
11
-
12
+
Original file line number Diff line number Diff line change
1
+ .. _c2c-api:
2
+
3
+ .. default-domain:: mongodb
4
+
5
+ ===
6
+ API
7
+ ===
8
+
9
+ .. toctree::
10
+ :titlesonly:
11
+
12
+ /reference/api/start
Original file line number Diff line number Diff line change
1
+ .. _c2c-api-start:
2
+
3
+ =========
4
+ ``start``
5
+ =========
6
+
7
+ .. default-domain:: mongodb
8
+
9
+ .. contents:: On this page
10
+ :local:
11
+ :backlinks: none
12
+ :depth: 2
13
+ :class: singlecol
14
+
15
+ Description
16
+ -----------
17
+
18
+ Starts the synchronization between a source and destination cluster.
19
+
20
+ Request
21
+ -------
22
+
23
+ .. code-block:: http
24
+
25
+ POST /api/v1/start
26
+
27
+ Request Body Parameters
28
+ ~~~~~~~~~~~~~~~~~~~~~~~
29
+
30
+ .. list-table::
31
+ :header-rows: 1
32
+ :stub-columns: 1
33
+ :widths: 20 13 13 54
34
+
35
+ * - Parameter
36
+ - Type
37
+ - Necessity
38
+ - Description
39
+
40
+ * - ``source``
41
+ - string
42
+ - Required
43
+ - Name of the source cluster.
44
+
45
+ * - ``destination``
46
+ - string
47
+ - Required
48
+ - Name of the destination cluster.
49
+
50
+ Response
51
+ --------
52
+
53
+ .. list-table::
54
+ :header-rows: 1
55
+ :stub-columns: 1
56
+ :widths: 20 14 66
57
+
58
+ * - Name
59
+ - Type
60
+ - Description
61
+
62
+ * - ``success``
63
+ - boolean
64
+ - When the request is successful, this value is ``true``.
65
+
66
+ * - ``error``
67
+ - string
68
+ - If an error occurred, indicates the name of the error. This field
69
+ is omitted from the response when ``success`` is ``true``.
70
+
71
+ * - ``errorDescription``
72
+ - string
73
+ - Detailed description of the error that occurred. This field is
74
+ omitted from the response when ``success`` is ``true``.
75
+
76
+ Example
77
+ -------
78
+
79
+ The following example starts a synchronization job where ``cluster0`` is
80
+ the source and ``cluster1`` is the destination.
81
+
82
+ Request
83
+ ~~~~~~~
84
+
85
+ .. literalinclude:: /includes/api/requests/start.sh
86
+ :language: shell
87
+
88
+ Response
89
+ ~~~~~~~~
90
+
91
+ .. literalinclude:: /includes/api/responses/success.sh
92
+ :language: shell
93
+
94
+ Behavior
95
+ --------
96
+
97
+ If {+c2c-product-name+} is in a state other than ``IDLE``, the request
98
+ fails.
You can’t perform that action at this time.
0 commit comments