Get One Snapshot for One Cluster
On this page
Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
Resource
GET /groups/{PROJECT-ID}/clusters/{CLUSTER-ID}/snapshots/{SNAPSHOT-ID}
Request Parameters
Request Path Parameters
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 |
---|---|---|
| string | Unique identifier of the cluster the snapshot represents. |
| string | Label that identifies the cluster. |
| boolean | Flag that indicates the snapshot has been created. This
is |
| document | Components of a timestamp. |
created .date | timestamp | iso8601-time when the snapshot was taken. |
created .increment | integer | Operation order in which this snapshot took place at this exact point in time. To learn how timestamps work in MongoDB, see Timestamps. |
| boolean | Flag that indicates the snapshot cannot be deleted. |
| timestamp | |
| string | |
| string | Unique identifier of the snapshot. |
isPossibly Inconsistent | boolean | Flag that indicates the consistency of this snapshot.
To take a snapshot of a sharded cluster in a consistent state, the Backup temporarily turns off the balancer before creating the snapshot. In some cases, it cannot turn off the balancer in a timely manner. The snapshot is then created with the balancer still running. If this happens, the snapshot may be in an inconsistent state (e.g., chunk migrations may be in progress). |
lastOplog AppliedTimestamp | document | Components of the timestamp of the last oplog entry was applied. |
lastOplog AppliedTimestamp .date | timestamp | |
lastOplog AppliedTimestamp .increment | integer | Operation order in which last oplog was applied at this exact point in time. To learn how timestamps work in MongoDB, see Timestamps. |
| object array | One or more links to sub-resources and/or related resources. All
|
| object | namespaces that are included or excluded from this snapshot. |
namespaceFilterList .filterList | string array | Comma-separated list of any combination of databases or namespaces that are exclusively included or explicitly excluded from the snapshot. The default value is an empty array ( |
namespaceFilterList .filterType | string | Label that determines how namespaces are filtered for this snapshot.
The default value is |
| array of objects | List of shards that the snapshot is missing. In steady state, this array is empty. If the Backup cannot
connect to a shard when a snapshot is created, the shard
is omitted from the snapshot. Each document in the array
is a cluster document containing a |
missingShards .id | string | Unique identifier of the missing shard. |
missingShards .groupId | string | Unique identifier of the project that owns the missing shard. |
missingShards .typeName | string | Type of server that the missing shard represents:
|
missingShards .clusterName | string | Name of the cluster for the missing shard. |
missingShards .shardName | string | Name of the missing shard. |
missingShards .replicaSetName | string | Name of the replica set in the missing shard. |
missingShards .lastHeartbeat | timestamp | |
| array of objects | Individual parts that comprise the complete snapshot.
|
parts .clusterId | string | Unique identifier of the replica set. |
parts .completedTime | string | Date and time when the snapshot completed. |
parts .compressionSetting | string | Method of compression for the snapshot. |
parts .dataSizeBytes | number | Total size of the data in the snapshot in bytes. |
parts .encryptionEnabled | boolean | Indicator of the state of encryption of the snapshot data. |
parts .fcv | string | Number that indicates the feature compatibility version of MongoDB that the replica set primary ran when MongoDB Cloud created the snapshot. |
parts .fileSizeBytes | number | Total size of the data files in bytes. |
parts .machineId | string | Hostname and port that indicate the node on which MongoDB Cloud created the snapshot. |
parts .masterKeyUUID | string | KMIP master key ID used to encrypt the snapshot data.
|
parts .mongodVersion | string | Version of |
parts .replicaSetName | string | Name of the replica set. |
parts .replicaState | string | The node's role at the time when snapshot process began. |
parts .storageSizeBytes | number | Total size of space allocated for document storage. |
parts .typeName | string | Type of server that the part represents:
|
Example Request
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --include \ --request GET "https://{opsManagerHost}:{port}/api/public/v1.0/groups/{PROJECT-ID}/clusters/{CLUSTER-ID}/snapshots/{SNAPSHOT-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
{ "clusterId" : "{CLUSTER-ID}", "complete" : true, "created" : { "date" : "2016-08-21T23:47:38Z", "increment" : 1 }, "doNotDelete" : false, "expires" : "2017-08-20T23:47:38Z", "groupId" : "{PROJECT-ID}", "id" : "{SNAPSHOT-ID}", "lastOplogAppliedTimestamp" : { "date" : "2017-08-21T09:14:51Z", "increment" : 1 }, "links" : [ { "href" : "https://{opsManagerHost}:{port}/api/public/v1.0/groups/{PROJECT-ID}/clusters/{CLUSTER-ID}/snapshots/{SNAPSHOT-ID}", "rel" : "self" } ], "namespaceFilterList" : { "filterList" : [ ], "filterType" : "blacklist" }, "parts" : [ { "clusterId" : "{CLUSTER-ID}", "compressionSetting" : "GZIP", "dataSizeBytes" : 503779557, "encryptionEnabled" : false, "fileSizeBytes" : 2855605344, "mongodVersion" : "4.0.9", "replicaSetName" : "proton", "storageSizeBytes" : 547516416, "typeName" : "REPLICA_SET" } ] }