Base URL: https://cloud.mongodb.com/api/public/v1.0
Resource
POST /groups/{PROJECT-ID}/clusters/{CLUSTER-ID}/restoreJobs/restorableTimeRanges
Returns the restorable time ranges for a backup-enabled replica set or sharded cluster in a project. Each restorable time range represents a continuous window of oplog history to which Cloud Manager can safely restore.
Required Permissions
You must have the Project Backup Admin or Organization Read Only role to call this endpoint.
Request Parameters
Request Path Parameters
Name | Type | Description |
|---|---|---|
| string | Unique 24-hexadecimal digit string that identifies the project that owns the cluster. |
| string | Unique 24-hexadecimal digit string that identifies the backup-enabled cluster whose restorable time ranges you want to return. |
Request Query Parameters
The following query parameters are optional:
Name | Type | Necessity | Description | Default | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
pretty | boolean | Optional | Flag indicating whether the response body should be in a prettyprint format. |
| ||||||
envelope | boolean | Optional | Flag that indicates whether or not to wrap the response in an envelope. Some API clients cannot 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
This endpoint doesn't use HTTP request body parameters.
Response
The response body contains an array of restorable time ranges. For replica sets, each element contains the following fields:
Name | Type | Description |
|---|---|---|
| BSON timestamp | Earliest point in time in this restorable range. This value is a BSON timestamp object with |
| BSON timestamp | Latest point in time in this restorable range. Cloud Manager can safely restore to any time between |
| string | Unique 24-hexadecimal digit string that identifies the snapshot or clustershot associated with this range. |
For sharded clusters, each element also includes:
Name | Type | Description |
|---|---|---|
| integer | Number of shards that participate in this restorable time range. |
| string | Human-readable label that indicates whether the sharded cluster uses an Embedded or Dedicated config server deployment. |
Cloud Manager returns the restorable time ranges ordered from earliest to latest start time.
Example Request
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --header "Content-Type: application/json" \ --include \ --request POST "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/clusters/{CLUSTER-ID}/restoreJobs/restorableTimeRanges?pretty=true"
Example Response
Response Header
401 Unauthorized Content-Type: application/json;charset=ISO-8859-1 Date: {dateInUnixFormat} WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false Content-Length: {requestLengthInBytes} Connection: keep-alive
200 OK Vary: Accept-Encoding Content-Type: application/json Strict-Transport-Security: max-age=300 Date: {dateInUnixFormat} Connection: keep-alive Content-Length: {requestLengthInBytes} X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
Response Body
[ { "end" : { "date" : "2021-07-17T19:00:00Z", "increment" : 1 }, "snapshotId" : "{SNAPSHOT-ID}", "start" : { "date" : "2021-07-14T00:00:00Z", "increment" : 1 } } ]