Navigation

Get All Cloud Provider Snapshot Restore Jobs

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.

The Atlas API uses HTTP Digest Authentication. Provide your Atlas username and API key as the username and password when constructing the HTTP request.

For complete documentation on configuring API access for an Atlas project, see Configure Atlas API Access.

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

Syntax

GET /groups/{GROUP-ID}/clusters/{CLUSTER-NAME}/backup/restoreJobs

Request Path Parameters

Path Element Description
GROUP-ID The unique identifier of the project for the Atlas cluster.
CLUSTER-NAME The name of the Atlas cluster for which you want to retrieve restore jobs.

Request Query Parameters

This endpoint may use any of the HTTP request query parameters available to all Atlas API resources. These are all optional.

Name Type Description Default
pageNum integer Page number (1-based). 1
itemsPerPage integer Number of items to return per page, up to a maximum of 500. 100
pretty boolean Display response in a prettyprint format. false
envelope boolean Specifies whether or not to wrap the response in an envelope. false

Request Body Parameters

This endpoint does not use HTTP request body parameters.

Response

Response Document

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.

Name Type Description
results object array This array includes one object for each item detailed in the results array section.
links object array This array includes one or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification.
totalCount number The count 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.

results array

Name Type Description
cancelled boolean Indicates whether the restore job was canceled.
createdAt Date UTC ISO 8601 formatted point in time when Atlas created the restore job.
deliveryType string

Type of restore job to create. Possible values are:

automated
Atlas automatically restores the snapshot with snapshotId to the Atlas cluster with name targetClusterName in the Atlas project with targetGroupId.
download
Atlas 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 Download your Snapshot via HTTPS.
deliveryUrl array One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
expired boolean Indicates whether the restore job expired.
expiresAt Date UTC ISO 8601 formatted point in time when the restore job expires.
finishedAt Date UTC ISO 8601 formatted point in time when the restore job completed.
id ObjectId The unique identifier of the restore job.
links array One or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification.
snapshotId string Unique identifier of the source snapshot ID of the restore job.
targetGroupId string Name of the target Atlas project of the restore job. Only visible if deliveryType is automated.
targetClusterName string Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
timestamp string Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.

Example Request

curl --user "{username:apiKey}" --digest --include \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --request GET "https://cloud.mongodb.com/api/atlas/v1.0/groups/5b6212af90dc76637950a2c6/clusters/MyCluster/backup/restoreJobs"

Example Response

{
    "links": [
        {
            "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5b6212af90dc76637950a2c6/clusters/Cluster0/backup/restoreJobs?pageNum=1&itemsPerPage=100",
            "rel": "self"
        }
    ],
    "results": [
        {
            "cancelled": false,
            "deliveryType": "automated",
            "expired": false,
            "expiresAt": "2018-08-02T02:08:48Z",
            "id": "5b622f7087d9d6039fafe03f",
            "links": [
                {
                    "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5b6212af90dc76637950a2c6/clusters/Cluster0/backup/restoreJobs/5b622f7087d9d6039fafe03f",
                    "rel": "self"
                },
                {
                    "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5b6212af90dc76637950a2c6/clusters/Cluster0/backup/snapshots/5b6211ff87d9d663c59d3dee",
                    "rel": "http://mms.mongodb.com/snapshot"
                },
                {
                    "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5b6212af90dc76637950a2c6/clusters/Cluster0",
                    "rel": "http://mms.mongodb.com/cluster"
                },
                {
                    "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5b6212af90dc76637950a2c6",
                    "rel": "http://mms.mongodb.com/group"
                }
            ],
            "snapshotId": "5b6211ff87d9d663c59d3feg",
            "targetClusterName": "MyOtherCluster",
            "targetGroupId": "5b6212af90dc76637950a2c6",
            "timestamp": "2018-08-01T20:02:07Z"
        },
        {
            "cancelled": false,
            "createdAt": "2018-08-01T22:05:41Z",
            "deliveryType": "download",
            "deliveryUrl": "https://restore.mongodb.net:27017/restore-5b622e3587d9d6039faf713f.tar.gz",
            "expired": false,
            "expiresAt": "2018-08-02T02:03:33Z",
            "id": "5b622e3587d9d6039faf713f",
            "links": [
                {
                    "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5b6212af90dc76637950a2c6/clusters/Cluster0/backup/restoreJobs/5b622e3587d9d6039faf713f",
                    "rel": "self"
                },
                {
                    "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5b6212af90dc76637950a2c6/clusters/Cluster0/backup/snapshots/5b6211ff87d9d663c59d3dee",
                    "rel": "http://mms.mongodb.com/snapshot"
                },
                {
                    "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5b6212af90dc76637950a2c6/clusters/Cluster0",
                    "rel": "http://mms.mongodb.com/cluster"
                },
                {
                    "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5b6212af90dc76637950a2c6",
                    "rel": "http://mms.mongodb.com/group"
                }
            ],
            "snapshotId": "5b6211ff87d9d663c59d3feg",
            "timestamp": "2018-08-01T20:02:07Z"
        }
    ],
    "totalCount": 2
}