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.

The possible values are:

  • AWS - Amazon AWS
  • GCP - Google Cloud Platform
  • AZURE - Microsoft Azure
providerSettings.regionName string

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

During deployment of a Atlas group’s first M10+ paid cluster, Atlas creates a VPC for the group that is specific to the cloud service provider and region of the cluster. All additional clusters deployed in that group are associated to the group’s VPC, locking the choice of cloud service provider and region.

AWS GCP Azure
  • 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

Note

EASTERN_US corresponds to the GCP us_east_1 region.

  • CENTRAL_US
  • EASTERN_US
  • WESTERN_EUROPE
  • EASTERN_ASIA_PACIFIC
  • US_CENTRAL
  • US_EAST
  • US_EAST_2
  • US_NORTH_CENTRAL
  • US_WEST
  • US_SOUTH_CENTRAL
  • EUROPE_NORTH
  • EUROPE_WEST
providerSettings.instanceSizeName string

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

To view available instance sizes: open the Atlas web interface; select Build a New Cluster; select your preferred cloud service provider and region; 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: open the Atlas web interface; select Build a New Cluster; select your preferred cloud service provider and region; click an instance size to view the available values for Custom Storage Speed; close the window 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"
}