Fix This Page
Navigation

Get a Single Cluster

The Atlas API uses HTTP Digest Authentication. Provide your Atlas username as the username and group API key as the password as part of the HTTP request.

For complete documentation on configuring API access for an Atlas group, see Configure Atlas API Access.

Base URL: https://cloud.mongodb.com/

Syntax

GET /api/atlas/v1.0/groups/{GROUP-ID}/clusters/{CLUSTER-NAME}

Request Path Parameters

Path Element Required/Optional Description
GROUP-ID Required. The unique identifier for the group containing the cluster you want to retrieve.
CLUSTER-NAME Required The name of the cluster to retrieve.

HTTP Response Elements

Name Type Description
name string The name of the cluster as it appears in Atlas.
groupId string ID of the group the cluster belongs to.
mongoDBVersion string The version of MongoDB the cluster runs, in <major version>.<minor version> format.
mongoDBMajorVersion string

The major version of MongoDB the cluster runs. Atlas supports the following MongoDB versions:

  • 3.2
  • 3.4
mongoURI string

The connection string for connecting to the cluster through a MongoDB driver or the mongo shell. To download the mongo shell, click a cluster’s Connect button and follow the download instructions.

When you create a new cluster, the mongoURI will not show up while the cluster is being built. Atlas provides the connection string only after the cluster is running.

mongoURIUpdated string Lists when the connection string was last updated. The connection string changes, for example, if you change a replica set to a sharded cluster.
numShards integer

Selects whether the cluster is a sharded cluster or a replica set and specifies the number of shards for a sharded cluster.

If this is set to 1, the cluster is a replica set. For more information on MongoDB replica sets, see Replication in the MongoDB manual.

If this is set to 2 or higher, the cluster is a sharded cluster with the number of shards specified. For more information on sharded clusters, see Sharding in the MongoDB manual.

For details on how this setting affects costs, see Number of Servers.

The possible values are 1 through 12.

replicationFactor number

The number of replica set members. Each member keeps a copy of your databases, providing high availability and data redundancy.

If your cluster is a sharded cluster, each shard is a replica set with the specified replication factor.

For information on how the replication factor affects costs, see Number of Servers. For more information on MongoDB replica sets, see Replication in the MongoDB manual.

The possible values are 3, 5, or 7.

providerSettings object The configuration for the provisioned servers on which MongoDB runs. The available options are specific to the cloud service provider.
providerSettings.providerName string

The cloud service provider on which the servers are provisioned.

Atlas currently integrates with Amazon Web Services (AWS). This field value is AWS until other integrations become available.

providerSettings.regionName string

The physical location of your MongoDB cluster. The region you choose can affect network latency for clients accessing your databases.

The region selected for the first cluster in the Atlas group determines the region for all clusters in that group. This is because a region-specific Virtual Private Cloud (VPC) is created for the Atlas group during the deployment of the group’s first cluster.

For AWS, Atlas currently supports the following regions:

  • ‘US_EAST_1’
  • ‘US_EAST_2’
  • ‘US_WEST_1’
  • ‘US_WEST_2’
  • ‘CA_CENTRAL_1’
  • ‘EU_WEST_1’
  • ‘EU_WEST_2’
  • ‘EU_CENTRAL_1’
  • ‘AP_NORTHEAST_1’
  • ‘AP_NORTHEAST_2’
  • ‘AP_SOUTHEAST_1’
  • ‘AP_SOUTHEAST_2’
  • ‘AP_SOUTH_1’
  • ‘SA_EAST_1’
providerSettings.instanceSizeName string

The name of the instance size used for the Atlas cluster.

To view available instance sizes: open the Atlas web interface; view an existing configuration or click the button to add a new one; view the available instance sizes; close the window without saving changes.

providerSettings.diskIOPS integer The maximum input/output operations per second (IOPS) the system can perform. The available IOPS depend on the instance size: each instance size has a specific set of available IOPS values. To view available values, use the Atlas interface to either view an existing configuration or add a new one; then click an instance size to view the available values; and then close the configuration without saving changes.
providerSettings.encryptEBSVolume Boolean AWS only. If enabled, the Amazon EBS encryption feature encrypts the server’s root volume for both data at rest within the volume and for data moving between the volume and the instance.
diskSizeGB double

The size in gigabytes of the server’s root volume. You can add capacity by increasing this number, up to a maximum possible value of 16384 (i.e., 16 TB).

Each instance size has its own default value. To view default values: open the Atlas web interface; click the button to add a new cluster; view the available default sizes; close the window without saving changes.

backupEnabled Boolean If enabled, the Atlas Backup service takes snapshots of your databases at regular intervals and retains them according to your group’s retention policy.
stateName string

The current state of the cluster. The possible states are:

  • IDLE
  • CREATING
  • UPDATING
  • DELETING
  • DELETED
  • REPAIRING

Example

Request

curl -i -u "username:apiKey" --digest "https://cloud.mongodb.com/api/atlas/v1.0/groups/5356823b3794de37132bb7b/clusters/LogData"

Response

HTTP/1.1 200 OK

{
  "name" : "LogData",
  "backupEnabled" : true,
  "diskSizeGB" : 80,
  "groupId" : "5356823b3794de37132bb7b",
  "mongoDBVersion" : "3.2.8",
  "mongoURI" : "mongodb://logdata-shard-00-00-ub6lu.mongodb.net:37017,logdata-shard-00-01-ub6lu.mongodb.net:37017,logdata-shard-00-02-ub6lu.mongodb.net:37017,logdata-shard-01-00-ub6lu.mongodb.net:37017,logdata-shard-01-01-ub6lu.mongodb.net:37017,logdata-shard-01-02-ub6lu.mongodb.net:37017",
  "mongoURIUpdated" : "2016-08-02T20:16:23Z",
  "numShards" : 2,
  "providerSettings" : {
    "providerName" : "AWS",
    "diskIOPS" : 240,
    "encryptEBSVolume" : false,
    "instanceSizeName" : "M40",
    "regionName" : "US_EAST_1"
  },
  "replicationFactor" : 3,
  "stateName" : "IDLE"
}