Create a Cloud Backup Restore Job¶
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
.
If you specify "deliveryType" : "automated"
or
"deliveryType" : "pointInTime"
in your request body to create an
automated restore job, Atlas removes all existing data on
the target cluster prior to the restore.
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.
All requests to this endpoint must originate from an IP address in the organization's API access list.
Syntax¶
https://cloud.mongodb.com/api/atlas/v1.0
POST /groups/{PROJECT-ID}/clusters/{CLUSTER-NAME}/backup/restoreJobs/
Request Path Parameters¶
Path Parameter | Type | Necessity | Description |
---|---|---|---|
PROJECT-ID | string | Required | Unique identifier of the project for the Atlas cluster whose snapshot you want to restore. |
SOURCE-CLUSTER-NAME | string | Required | Name of the Atlas cluster whose snapshot you want to restore. |
Request Query Parameters¶
This endpoint might use any of the HTTP request query parameters available to all Atlas API resources. All of these 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 indicating if Atlas should wrap the response in a JSON envelope. This option may be needed for some API clients. These 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:
| false |
The request body, response body, and examples depend on the type of restore:
Request Body Parameters¶
Body Parameter | Type | Necessity | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
deliveryType | string | Required | Type of restore job to create. Accepted values include:
| ||||||||
snapshotId | string | Required | Unique identifier of the snapshot to restore. | ||||||||
target ClusterName | string | Required | Name of the target Atlas cluster to which the restore job restores the snapshot. | ||||||||
target GroupId | string | Required | Unique identifier of the target Atlas project for the specified targetClusterName. |
Response¶
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
cancelled | boolean | Flag indicating whether the restore job was canceled. | ||||||||
createdAt | string | Timestamp in ISO 8601 date and time format in UTC when Atlas created the restore job. | ||||||||
deliveryType | string | Type of restore job to create. Atlas may return:
| ||||||||
expired | boolean | Flag indicating whether the restore job expired. | ||||||||
expiresAt | integer | Timestamp in ISO 8601 date and time format in UTC when the restore job expires. | ||||||||
finishedAt | integer | Timestamp in ISO 8601 date and time format in UTC when the restore job completed. | ||||||||
id | string | Unique identifier of the restore job. | ||||||||
links | array of objects | One or more links to sub-resources and/or related resources. The relation-types between URL |