Get All Restore Jobs for an M2/M5 Cluster

Info With Circle IconCreated with Sketch.Note

Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project ID. For existing groups, your group/project ID remains the same. The resource and corresponding endpoints use the term groups.

Retrieve all snapshot restore jobs for a specified M2 or M5 shared-tier cluster.

The Atlas API authenticates using HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

To learn how to configure API access for an Atlas project, see Configure Atlas API Access.

GET /groups/{GROUP-ID}/clusters/{CLUSTER-NAME}/backup/tenant/restores
Path ElementDescription
GROUP-IDUnique identifier of the project for the Atlas cluster.
CLUSTER-NAMEName of the Atlas cluster for which you want to retrieve restore jobs.

The following query parameters are optional:

pageNumintegerOptionalPage number, starting with one, that Atlas returns of the total number of objects.1
itemsPerPageintegerOptionalNumber of items that Atlas returns per page, up to a maximum of 500.100
includeCountbooleanOptionalFlag that indicates whether Atlas returns the totalCount parameter in the response body.true
prettybooleanOptionalFlag that indicates whether Atlas returns the JSON response in the prettyprint format.false

Flag that indicates whether Atlas wraps 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.

Endpoints that return a list of results use the results object as an envelope. Atlas adds the status parameter to the response body.


This endpoint does not use HTTP request body parameters.

The response JSON document includes an array of result objects, an array of link objects, and a count of the total number of result objects retrieved.

resultsobject arrayIncludes one object for each item detailed in the results array section.
linksobject arrayIncludes one or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification.
totalCountnumberCount of the total number of items in the result set. It may be greater than the number of objects in the results array if the entire result set is paginated.
clusterNamestringName of the source Atlas cluster.

Type of restore job to create. Possible values are:

RESTOREAtlas automatically restores the snapshot with snapshotId to the Atlas cluster with name targetDeploymentItemName in the Atlas project with targetProjectId.
DOWNLOADAtlas provides a URL to download a .tar.gz of the snapshot with snapshotId. The contents of the archive contain the data files for your Atlas cluster. To learn more about manually restoring the downloaded data files, see Procedure.
expirationDatedateTimestamp in ISO 8601 date and time format in UTC when the download link expires.
idobjectIdUnique identifier of the restore job.
projectIdobjectIdUnique identifier of the Atlas project from which the restore job originated.
restoreFinishedDatedateTimestamp in ISO 8601 date and time format in UTC when Atlas marked the restore job as COMPLETED.
restoreScheduledDatedateTimestamp in ISO 8601 date and time format in UTC when the restore was requested.
snapshotFinishedDatedateTimestamp in ISO 8601 date and time format in UTC when the snapshot associated with snapshotId was marked as COMPLETED.
snapshotIdstringUnique identifier of the source snapshot ID of the restore job.
snapshotUrlstringURL for the compressed snapshot files for manual download. Only visible if deliveryType is DOWNLOAD.

Current status of the restore job. Possible values are:

targetDeploymentItemNamestringName of the target Atlas project of the restore job.
targetProjectIdstringUnique identifier of the Atlas project to which the restore job restores the snapshot.
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest --include \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--request GET ""
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}
"results" : [ {
"clusterName" : "aws-cluster-1",
"deliveryType" : "DOWNLOAD",
"expirationDate" : "2019-05-01T19:02:25Z",
"finishedDate" : "2019-05-01T15:02:25Z",
"id" : "5cc9b501e5dc7c8ab1e45d65",
"projectId" : "5b69d0349b15c62cdfc38b78",
"snapshotId" : "5cc9ad92e5dc7c8ab1e41c50",
"snapshotUrl" : "{SNAPSHOT-URL}",
"status" : "COMPLETED",
"submittedAt" : "2019-05-01T15:02:25Z",
"targetDeploymentItemName" : "aws-cluster-1",
"targetProjectId" : "5b69d0349b15c62cdfc38b78",
"timestamp" : "2019-05-01T14:33:19Z"
}, {
"clusterName" : "aws-cluster-1",
"deliveryType" : "RESTORE",
"expirationDate" : "2019-05-01T18:34:19Z",
"id" : "5cc9ae6be5dc7c8ab1e422df",
"projectId" : "5b69d0349b15c62cdfc38b78",
"snapshotId" : "5cc9ad92e5dc7c8ab1e41c50",
"status" : "PENDING",
"submittedAt" : "2019-05-01T14:34:19Z",
"targetDeploymentItemName" : "aws-cluster-1",
"targetProjectId" : "5b69d0349b15c62cdfc38b78",
"timestamp" : "2019-05-01T14:33:19Z"
} ],
"totalCount" : 2
Give Feedback