|
| 1 | +========================== |
| 2 | +Take an On-Demand Snapshot |
| 3 | +========================== |
| 4 | + |
| 5 | +.. default-domain:: mongodb |
| 6 | + |
| 7 | +.. contents:: On this page |
| 8 | + :local: |
| 9 | + :backlinks: none |
| 10 | + :depth: 2 |
| 11 | + :class: singlecol |
| 12 | + |
| 13 | +.. include:: /includes/api/base-api-uri.rst |
| 14 | + |
| 15 | +Resource |
| 16 | +-------- |
| 17 | + |
| 18 | +.. code-block:: http |
| 19 | + |
| 20 | + POST /groups/{groupId}/clusters/{clusterId}/snapshots/onDemandSnapshot |
| 21 | + |
| 22 | +Required Permissions |
| 23 | +-------------------- |
| 24 | + |
| 25 | +You must have the :authrole:`Global Backup Admin` to |
| 26 | +take an on-demand snapshot. |
| 27 | + |
| 28 | +Request Parameters |
| 29 | +------------------ |
| 30 | + |
| 31 | +Request Path Parameters |
| 32 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 33 | + |
| 34 | +.. list-table:: |
| 35 | + :widths: 10 10 80 |
| 36 | + :header-rows: 1 |
| 37 | + :stub-columns: 1 |
| 38 | + |
| 39 | + * - Name |
| 40 | + - Type |
| 41 | + - Description |
| 42 | + |
| 43 | + * - GROUP-ID |
| 44 | + - string |
| 45 | + - Unique identifier of your project from your project settings. |
| 46 | + |
| 47 | + * - CLUSTER-ID |
| 48 | + - string |
| 49 | + - Unique identifier of the cluster that the :manual:`snapshot </reference/glossary/#std-term-snapshot>` represents. |
| 50 | + |
| 51 | +Request Query Parameters |
| 52 | +~~~~~~~~~~~~~~~~~~~~~~~~ |
| 53 | + |
| 54 | +The following query parameters are optional: |
| 55 | + |
| 56 | +.. list-table:: |
| 57 | + :widths: 20 14 11 45 10 |
| 58 | + :header-rows: 1 |
| 59 | + :stub-columns: 1 |
| 60 | + |
| 61 | + * - retentionDays |
| 62 | + - number |
| 63 | + - Required |
| 64 | + - Integer that indicates the number of days the the on-demand |
| 65 | + snapshot will be retained. Must be greater than 0. |
| 66 | + - ``15`` |
| 67 | + |
| 68 | + * - envelope |
| 69 | + - boolean |
| 70 | + - Optional |
| 71 | + - Flag that indicates whether or not to wrap the response in an |
| 72 | + envelope. |
| 73 | + |
| 74 | + Some |api| clients cannot access the |http| response headers or |
| 75 | + status code. To remediate this, set ``envelope : true`` in the |
| 76 | + query. |
| 77 | + |
| 78 | + For endpoints that return a list of results, the ``results`` |
| 79 | + object is an envelope. |mms| adds the ``status`` field to the |
| 80 | + response body. |
| 81 | + |
| 82 | + - ``false`` |
| 83 | + |
| 84 | +Request Body Parameters |
| 85 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 86 | + |
| 87 | +.. include:: /includes/api/no-body-parameters.rst |
| 88 | + |
| 89 | +Response |
| 90 | +-------- |
| 91 | + |
| 92 | +Example Request |
| 93 | +--------------- |
| 94 | + |
| 95 | +.. code-block:: sh |
| 96 | + |
| 97 | + curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ |
| 98 | + --include \ |
| 99 | + --request POST "https://{opsManagerHost}:{port}/api/public/v1.0/groups/{groupId}/clusters/{clusterId}/snapshots/onDemandSnapshot" |
| 100 | + |
| 101 | +Example Response |
| 102 | +---------------- |
| 103 | + |
| 104 | +Response Header |
| 105 | ++++++++++++++++ |
| 106 | + |
| 107 | +.. include:: /includes/api/api-headers/401.rst |
| 108 | + |
| 109 | +.. include:: /includes/api/api-headers/200.rst |
| 110 | + |
| 111 | +Response Body |
| 112 | ++++++++++++++ |
| 113 | + |
| 114 | +.. code-block:: json |
| 115 | + |
| 116 | + { |
| 117 | + "clusterName": "myCluster", |
| 118 | + "description": "On demand snapshot request complete .", |
| 119 | + "timestamp": { |
| 120 | + "increment": 1, |
| 121 | + "time": 1719518976, |
| 122 | + "date": "2024-06-27T20:09:36Z" |
| 123 | + } |
| 124 | + } |
0 commit comments