Get One Restore Job for One Legacy Mirrored Config Server
On this page
- OAuth 2.0 authentication for programmatic access to Cloud Manager is available as a Preview feature.
- The feature and the corresponding documentation might change at any time during the Preview period. To use OAuth 2.0 authentication, create a service account to use in your requests to the Cloud Manager Public API.
Base URL: https://cloud.mongodb.com/api/public/v1.0
Resource
GET /groups/{PROJECT-ID}/hosts/{HOST-ID}/restoreJobs/{JOB-ID}
Request Path Parameters
Name | Type | Description |
---|---|---|
PROJECT-ID | string | Unique identifier of the project that owns the restore job. |
HOST-ID | string | Unique identifier of the mirrored config server (SCCC) that the restore job represents. |
JOB-ID | string | Unique identifier of the restore job. |
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. |
| ||||||
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:
|
|
Request Body Parameters
This endpoint doesn't use HTTP request body parameters.
Response
Name | Type | Description |
---|---|---|
batchId | string | Conditional: sharded cluster only. Unique identifier of the batch to which this restore job belongs. |
clusterId | string | |
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 | Conditional: |
delivery.expires | string | Conditional: |
delivery.maxDownloads | number | Conditional: |
delivery.methodName | string | Means by which the data is delivered. Accepted values are:
IMPORTANT: Restore delivery via SCP has been removed as of March 27, 2018. |
delivery.statusName | string | Current status of the downloadable file. Accepted values are:
|
delivery.url | string | Conditional: |
groupId | string | Unique identifier of the group that owns the restore job. |
hashes | object array | If the corresponding For an |
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
present, this value is |
hostId | string | Conditional: mirrored config server (SCCC). Unique identifier of the config server to which this restore job belongs. |
id | string | Unique identifier of the restore job. |
links | object array | One or more links to sub-resources and/or related resources. All
|
pointInTime | boolean | Flag indicating that the job for a PIT restore. |
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
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --include \ --request GET "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/hosts/{HOST-ID}/restoreJobs/{JOB-ID}?pretty=true"
Example Response
Response Header
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
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}
Response Body
{ "batchId" : "{BATCH-ID}", "created" : "2016-03-04T22:07:27Z", "delivery" : { "expirationHours" : 1, "expires" : "2016-03-04T23:07:27Z", "maxDownloads" : 1, "methodName" : "HTTP", "statusName" : "READY", "url" : "https://api-backup.mongodb.com/backup/restore/v2/pull/{JOB-ID}/1976673072885966399/electron_0-1456098690-{JOB-ID}.tar.gz" }, "encryptionEnabled" : false, "groupId" : "{PROJECT-ID}", "hostId" : "{HOST-ID}", "id" : "{JOB-ID}", "links" : [ { } ], "pointInTime" : false, "snapshotId" : "{SNAPSHOT-ID}", "statusName" : "FINISHED", "timestamp" : { "date" : "2017-04-19T21:14:25Z", "increment" : 1 } }