Docs Menu
Docs Home
/
MongoDB Cloud Manager
/ / / /

Get All Snapshots for One Cluster

On this page

  • Resource
  • Request Parameters
  • Request Path Parameters
  • Request Query Parameters
  • Request Body Parameters
  • Response
  • Response Document
  • results Embedded Document
  • Example Request
  • Example Response

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

GET /groups/{PROJECT-ID}/clusters/{CLUSTER-ID}/snapshots
Name
Type
Description
PROJECT-ID
string
Unique identifier of the project that owns the snapshot.
CLUSTER-ID
string
Unique identifier of the cluster that the snapshot represents.

The following query parameters are optional:

Name
Type
Necessity
Description
Default
pageNum
number
Optional
One-based integer that returns a subsection of results.
1
itemsPerPage
number
Optional
Number of items to return per page, up to a maximum of 500.
100
pretty
boolean
Optional
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 a list of results, the content object is an envelope. Cloud Manager adds the status field to the response body.

false
backupJobsEnabledOnly
boolean
Optional
Flag indicating whether to exclude daemons not enabled for backing up databases from the response. Set this to false to include daemon configurations with the backupJobsEnabled flag set to false.
true

This endpoint doesn't use HTTP request body parameters.

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.

Each result is one sync store.

Name
Type
Description
clusterId
string
Unique identifier of the cluster the snapshot represents.
complete
boolean
Flag that indicates the snapshot has been created. This is false if the snapshot creation job is still in progress.
created
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.
doNotDelete
boolean
Flag that indicates the snapshot cannot be deleted.
expires
timestamp

Timestamp in ISO 8601 date and time format in UTC at UTC after which this snapshot can be deleted.

If doNotDelete is set to true, any value in expires is removed.

If the expires value is earlier than the current date and time, it cannot be edited.

groupId
string
Unique identifier of the project that owns the snapshot.
id
string
Unique identifier of the snapshot.
isPossibly
Inconsistent
boolean

Flag that indicates the consistency of this snapshot. isPossiblyInconsistent appears for sharded cluster snapshots only.

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
Timestamp in ISO 8601 date and time format in UTC at UTC when the last oplog was applied.
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.
links
object array

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.

namespaceFilterList
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.

  • If this value is set to blacklist, namespaces in namespaceFilterList.filterList are excluded from the snapshot.

  • If this value is set to whitelist, only namespaces in namespaceFilterList.filterList are included in the snapshot.

The default value is blacklist.

missingShards
array of objects

List of shards that the snapshot is missing. missingShards appears for sharded cluster snapshots only.

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 self link.

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:

  • CONFIG_SERVER_REPLICA_SET

  • REPLICA_SET

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
Timestamp in ISO 8601 date and time format in UTC at UTC when the last heartbeat was received from the missing shard.
parts
array of objects

Individual parts that comprise the complete snapshot.

parts
.clusterId
string
Unique identifier of the replica set.
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
.fileSizeBytes
number
Total size of the data files in bytes.
parts
.masterKeyUUID
string
KMIP master key ID used to encrypt the snapshot data. parts.masterKeyUUID appears only if this snapshot has parts.encryptionEnabled : true.
parts
.mongodVersion
string
Version of mongod that the replica set primary was running when the snapshot was created.
parts
.replicaSetName
string
Name of the replica set.
parts
.storageSizeBytes
number
Total size of space allocated for document storage.
parts
.typeName
string

Type of server that the part represents:

  • REPLICA_SET

  • CONFIG_SERVER_REPLICA_SET

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}/clusters/{CLUSTER-ID}/snapshots?pretty=true"
HTTP/1.1 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
HTTP/1.1 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}
{
"links" : [ {
"href" : "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/clusters/{CLUSTER-ID}/snapshots?pretty=true&pageNum=1&itemsPerPage=100",
"rel" : "self"
} ],
"results" : [ {
"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}",
"links" : [ {
"href" : "https://cloud.mongodb.com/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"
} ]
}, {
} ],
"totalCount" : 28
}

Back

Snapshots