For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Get Restorable Time Ranges for One Cluster

Base URL: https://cloud.mongodb.com/api/public/v1.0

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.

You must have the Project Backup Admin or Organization Read Only role to call this endpoint.

Name
Type
Description

PROJECT-ID

string

Unique 24-hexadecimal digit string that identifies the project that owns the cluster.

CLUSTER-ID

string

Unique 24-hexadecimal digit string that identifies the backup-enabled cluster whose restorable time ranges you want to return.

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.

false

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:

Name
Description

status

HTTP response code

content

Expected response body

false

This endpoint doesn't use HTTP request body parameters.

The response body contains an array of restorable time ranges. For replica sets, each element contains the following fields:

Name
Type
Description

start

BSON timestamp

Earliest point in time in this restorable range. This value is a BSON timestamp object with date and increment fields, which together uniquely identify an oplog entry.

end

BSON timestamp

Latest point in time in this restorable range. Cloud Manager can safely restore to any time between start and end, inclusive, for this range.

snapshotId

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

shardCount

integer

Number of shards that participate in this restorable time range.

configServerType

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.

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"
HTTP/1.1 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
HTTP/1.1 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}
[
{
"end" : {
"date" : "2021-07-17T19:00:00Z",
"increment" : 1
},
"snapshotId" : "{SNAPSHOT-ID}",
"start" : {
"date" : "2021-07-14T00:00:00Z",
"increment" : 1
}
}
]