- API >
- Public API Resources >
- Backup and Restore >
- Restore Jobs >
- Create One Restore Job for One Cluster
Create One Restore Job for One Cluster¶
On this page
All requests to this endpoint must originate from an IP address on the Ops Manager user’s API access list. For complete documentation on configuring API access lists, see Enable API Whitelisting for Your Organization.
Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Resource¶
Request Path Parameters¶
Name | Type | Description |
---|---|---|
PROJECT-ID |
string | Unique identifier of the project that owns the job. |
CLUSTER-ID |
string | Unique identifier of the cluster that the job represents. |
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. | 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:
|
false |
Request Body Parameters¶
- HTTP Restore
- Automated Restore
Name | Type | Necessity | Description |
---|---|---|---|
delivery |
object | Required | Method and details of how the restored snapshot data is delivered. |
delivery .expires |
string | Conditional | Timestamp in ISO 8601 date and time format in UTC after which the URL is no longer available. Condition If you set |
delivery .expirationHours |
number | Conditional | Number of hours the download URL is valid once the restore job is complete. Condition If you set |
delivery .maxDownloads |
number | Required | Number of times the download URL can be used. This must be
1 or greater. |
delivery .methodName |
string | Required | Means by which Ops Manager delivers the data. Set to HTTP . |
snapshotId |
string | Required | Unique identifier of the snapshot to restore. |
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 |
array | Array includes one object for each item detailed in the results Embedded Document section. |
links |
array | 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 | Integer 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 Embedded Document¶
Each result is one cluster restore job. This array includes one restore job only.
Name | Type | Description |
---|---|---|
batchId |
string | Unique identifier of the batch to which this restore job belongs. Returned if snapshot was from a sharded cluster. |
clusterId |
string | Unique identifier of the cluster that the restore job represents. Returned if snapshot was from a replica set or sharded cluster. |
created |
string | Timestamp in ISO 8601 date and time format in UTC when the restore job was requested. |
delivery |
object | Method and details of how the restored snapshot data is delivered. |
delivery .expirationHours |
number | Number of hours the download URL is valid once the restore job is complete. |
delivery .expires |
string | Timestamp in ISO 8601 date and time format in UTC after which the URL is no longer available. |
delivery .maxDownloads |
number | Number of times the download URL can be used. This must be
1 or greater. |
delivery .methodName |
string | Means by which the data is delivered. Returns HTTP . |
delivery .statusName |
string | Current status of the downloadable file. Accepted values are:
|
delivery .url |
string | URL from which the restored snapshot data can be downloaded. |
groupId |
string | Unique identifier of the group that owns the restore job. |
hashes |
array of objects | If the corresponding delivery.url has been downloaded, this
array returns a single object that represents the hash of
the .tar.gz file. |
hashes .fileName |
string | Name of the snapshot file that has been hashed. |
hashes .hash |
string | Hash of the snapshot file. |
hashes .typeName |
string | Hashing algorithm used to compute the hash value. If returned,
value is set to SHA1 . |
hostId |
string | Unique identifier of the config server to which this restore job belongs. Returned if config server was a SCCC. |
id |
string | Unique identifier of the restore job. |
links |
array of objects | One or more links to sub-resources and/or related resources. All
links arrays in responses include at least one link called
self . The relationships between URLs are explained in the
Web Linking Specification. |
pointInTime |
boolean | Flag indicating if the snapshot was from a point in time. |
snapshotId |
string | Unique identifier of the snapshot to restore. |
statusName |
string | Current status of the job. Accepted values are:
|
timestamp |
object | Timestamp of the Oplog entry when the snapshot was created. |
timestamp .date |
string | Timestamp in ISO 8601 date and time format in UTC of the latest oplog entry in the restored snapshot. |
timestamp .increment |
string | Order of all operations completed at the latest oplog entry in the restored snapshot. |
Example Request¶
Create a restore job that transfers a compressed snapshot using HTTP.