Navigation
You were redirected from a different version of the documentation. Click here to go back.

Checkpoints

Note

Groups and projects are synonymous terms. Your {PROJECT-ID} is the same as your project id. For existing groups, your group/project id remains the same. This page uses the more familiar term group when referring to descriptions. The endpoint remains as stated in the document.

This resource allows you to view Checkpoints metadata. You can use checkpoints to create custom snapshots of a cluster at points in time between regular snapshots.

Important

You may use checkpoints for clusters that run MongoDB with Feature Compatibility Version of 4.0 or earlier. Checkpoints were removed from MongoDB instances with FCV of 4.2 or later.

Endpoints

Get All Checkpoints

Get all checkpoints for a cluster.

GET /groups/{PROJECT-ID}/clusters/CLUSTER-ID/checkpoints

Get One Checkpoint

Get a single checkpoint.

GET /groups/{PROJECT-ID}/clusters/CLUSTER-ID/checkpoints/CHECKPOINT-ID

Sample Entity

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  "clusterId" : "{CLUSTER-ID}",
  "completed" : "2015-07-31T23:19:51Z",
  "groupId" : "{GROUP-ID}",
  "id" : "{CHECKPOINT-ID}",
  "parts" : [ {
    "replicaSetName" : "shard_1",
    "shardName" : "shard_1",
    "tokenDiscovered" : true,
    "tokenTimestamp" : {
      "date" : "2015-07-31T23:19:51Z",
      "increment" : 1
    },
    "typeName" : "REPLICA_SET"
  }, {
    "replicaSetName" : "shard_0",
    "shardName" : "shard_0",
    "tokenDiscovered" : true,
    "tokenTimestamp" : {
      "date" : "2015-07-31T23:19:51Z",
      "increment" : 1
    },
    "typeName" : "REPLICA_SET"
  }, {
    "hostId" : "{HOST-ID}",
    "tokenDiscovered" : true,
    "tokenTimestamp" : {
      "date" : "2015-07-31T23:19:51Z",
      "increment" : 6
    },
    "typeName" : "CONFIG_SERVER"
  } ],
  "restorable" : true,
  "started" : "2015-07-31T23:19:51Z",
  "timestamp" : "2015-07-31T23:19:47Z"
}

Entity Fields

Name Type Description
clusterId string Unique identifier of the cluster represented by the checkpoint.
completed string Timestamp in ISO 8601 date and time format in UTC for the point-in-time when the checkpoint completed and the balancer restarted.
groupId string Unique identifier of the group that owns the checkpoint.
id string Unique identifier of the checkpoint.
parts array of objects Individual parts that comprise the complete checkpoint. There will be one element for each shard plus one element for the config servers.
parts
.replicaSetName
string Name of the replica set. Not present for a config server.
parts
.shardName
string Name of the shard.
parts
.tokenDiscovered
Boolean Flag that indicates whether the token exists.
parts
.tokenTimestamp
object Timestamp of an entry in the oplog, as specified by the entry’s ts field. The ts field is a BSON timestamp and has two components: the timestamp, which is the value in seconds since the Unix epoch, and the increment, which is an incrementing ordinal for operations within a given second.
parts
.typeName
string

Type of server represented by the part. Possible values are:

  • REPLICA_SET, which indicates the part is a shard.
  • CONFIG_SERVER
restorable Boolean Flag that indicates whether the checkpoint can be used for a restore.
started string Timestamp in ISO 8601 date and time format in UTC for the point-in-time when Cloud Manager stopped the balancer and began the checkpoint.
timestamp string Timestamp in ISO 8601 date and time format in UTC for the point-in-time to which the checkpoint restores data.

Examples

Get All Checkpoints

Request

curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
     --header "Accept: application/json" \
     --include \
     --request GET "https://cloud.mongodb.com/api/public/v1.0/groups/{GROUP-ID}/clusters/{CLUSTER-ID}/checkpoints"

Response

Response Header

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}

Response Body

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  "links" : [],
  "results" : [ {
    "clusterId" : "{CLUSTER-ID}",
    "completed" : "2015-07-31T23:35:52Z",
    "groupId" : "{GROUP-ID}",
    "id" : "55bc0658e4b097a3efe06f1f",
    "links" : [],
    "parts" : [ {
      "replicaSetName" : "shard_1",
      "shardName" : "shard_1",
      "tokenDiscovered" : true,
      "tokenTimestamp" : {
        "date" : "2015-07-31T23:35:52Z",
        "increment" : 1
      },
      "typeName" : "REPLICA_SET"
    }, {
      "replicaSetName" : "shard_0",
      "shardName" : "shard_0",
      "tokenDiscovered" : true,
      "tokenTimestamp" : {
        "date" : "2015-07-31T23:35:52Z",
        "increment" : 1
      },
      "typeName" : "REPLICA_SET"
    }, {
      "hostId" : "{HOST-ID}",
      "tokenDiscovered" : true,
      "tokenTimestamp" : {
        "date" : "2015-07-31T23:35:52Z",
        "increment" : 2
      },
      "typeName" : "CONFIG_SERVER"
    } ],
    "restorable" : true,
    "started" : "2015-07-31T23:35:52Z",
    "timestamp" : "2015-07-31T23:34:47Z"
  },
  ...
  ],
  "totalCount" : 6
}

Get One Checkpoint

Request

curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
     --header "Accept: application/json" \
     --include \
     --request GET "https://cloud.mongodb.com/api/public/v1.0/groups/{GROUP-ID}/clusters/{CLUSTER-ID}/checkpoints/{CHECKPOINT-ID}"

Response

Response Header

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}

Response Body

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
  "clusterId" : "{CLUSTER-ID}",
  "completed" : "2015-07-31T23:19:51Z",
  "groupId" : "{GROUP-ID}",
  "id" : "{CHECKPOINT-ID}",
  "links" : [],
  "parts" : [ {
    "replicaSetName" : "shard_1",
    "shardName" : "shard_1",
    "tokenDiscovered" : true,
    "tokenTimestamp" : {
      "date" : "2015-07-31T23:19:51Z",
      "increment" : 1
    },
    "typeName" : "REPLICA_SET"
  }, {
    "replicaSetName" : "shard_0",
    "shardName" : "shard_0",
    "tokenDiscovered" : true,
    "tokenTimestamp" : {
      "date" : "2015-07-31T23:19:51Z",
      "increment" : 1
    },
    "typeName" : "REPLICA_SET"
  }, {
    "hostId" : "{HOST-ID}",
    "tokenDiscovered" : true,
    "tokenTimestamp" : {
      "date" : "2015-07-31T23:19:51Z",
      "increment" : 6
    },
    "typeName" : "CONFIG_SERVER"
  } ],
  "restorable" : true,
  "started" : "2015-07-31T23:19:51Z",
  "timestamp" : "2015-07-31T23:19:47Z"
}