Note
Groups and projects are synonymous terms. Your {PROJECT-ID} is the same as your group id. For existing groups, your group/project id remains the same. This page uses the more familiar term group when referring to descriptions. The endpoint remains as stated in the document.
Resource
PATCH /groups/{PROJECT-ID}/backupConfigs/{CLUSTER-ID}/snapshotScheduleRequest Parameters
Request Path Parameters
Parameter | Type | Necessity | Description |
|---|---|---|---|
| string | Required | Unique identifier for the project that holds the cluster with the snapshot schedule you want to update. |
| string | Required | Unique identifier of the cluster whose snapshot schedule you want to update. |
Request Query Parameters
The following query parameters are optional:
Name | Type | Necessity | Description | Default |
|---|---|---|---|---|
pretty | boolean | Optional | Flag indicating whether to return the response body in a prettyprint format. |
|
envelope | boolean | Optional | Flag that indicates whether to wrap the response in an envelope. Some API clients can't access the HTTP response headers or status code. To remediate this, set envelope=true in the query. For endpoints that return one result, the response body includes:
|
|
Request Body Parameters
Name | Type | Necessity | Description |
|---|---|---|---|
| number | Optional | Number of minutes between successive cluster checkpoints. This only applies to sharded clusters. This number determines the granularity of point-in-time restores for sharded clusters. You can set a value of IMPORTANT: You may use checkpoints for clusters that run MongoDB with |
| string | Optional | Unique identifier of the cluster to which this backup configuration applies. |
| number | Optional | Number of days to retain daily snapshots. You can set a value between Setting |
| string | Optional | Day of the week when Cloud Manager takes a full snapshot. This ensures a recent complete backup. Cloud Manager sets the default value to a random weekday. |
| string | Optional | Unique identifier of the project that owns the backup configuration. |
| array of objects | Optional | One or more links to sub-resources and/or related resources. All |
| number | Optional | Number of months to retain monthly snapshots. You can set a value between Setting |
| number | Optional | Number of hours between snapshots. You can set a value of |
| number | Optional | Number of days to keep recent snapshots. You can set a value between |
| number | Optional | Number of weeks to retain weekly snapshots. You can set a value between Setting |
Response
Name | Type | Description |
|---|---|---|
| number | Number of minutes between successive cluster checkpoints. This only applies to sharded clusters. This number determines the granularity of point-in-time restores for sharded clusters. Cloud Manager may return values of IMPORTANT: You may use checkpoints for clusters that run MongoDB with |
| string | Unique identifier of the cluster to which this backup configuration applies. |
| number | Number of days to retain daily snapshots. Cloud Manager may return values between Setting |
| string | Day of the week when Cloud Manager takes a full snapshot. This ensures a recent complete backup. Cloud Manager sets the default value to a random weekday. |
| string | Unique identifier of the project that owns the backup configuration. |
| array of objects | One or more links to sub-resources and/or related resources. All |
| number | Number of months to retain monthly snapshots. Cloud Manager may return values between Setting |
| number | Number of hours in the past for which a point-in-time snapshot can be created. You cannot change this value for a snapshot. |
| number | Number of hours between snapshots. Cloud Manager may return values of |
| number | Number of days to keep recent snapshots. Cloud Manager may return values between |
| number | Number of weeks to retain weekly snapshots. Cloud Manager may return values between Setting |
Example Request
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --header "Content-Type: application/json" \ --include \ --request PATCH "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/backupConfigs/{CLUSTER-ID}/snapshotSchedule" \ --data ' { "fullIncrementalDayOfWeek":"TUESDAY", "snapshotIntervalHours": 8, "dailySnapshotRetentionDays": 15, "monthlySnapshotRetentionMonths": 6 }'Example Response
Response Header
HTTP/1.1 401 UnauthorizedContent-Type: application/json;charset=ISO-8859-1Date: {dateInUnixFormat}WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=falseContent-Length: {requestLengthInBytes}Connection: keep-aliveHTTP/1.1 200 OKVary: Accept-EncodingContent-Type: application/jsonStrict-Transport-Security: max-age=300Date: {dateInUnixFormat}Connection: keep-aliveContent-Length: {requestLengthInBytes}X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}Response Body
{ "clusterId" : "{CLUSTER-ID}", "dailySnapshotRetentionDays" : 15, "fullIncrementalDayOfWeek":"TUESDAY", "groupId" : "{PROJECT-ID}", "links" : [], "monthlySnapshotRetentionMonths" : 6, "pointInTimeWindowHours": 24, "snapshotIntervalHours" : 8, "snapshotRetentionDays" : 2, "weeklySnapshotRetentionWeeks" : 4}