Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Cluster

Creates a new Cluster. The full Cluster needs to be provided to create the object. Optional data will be filled with defaults or left empty.

post
/clusters
Authorizations
AuthorizationstringRequired

The token can be generated using the Authentication API.

Body
metadataanyOptional

Metadata

propertiesone ofRequired

A MongoDB cluster is the top-level logical unit that groups one or more MongoDB server instances into a single, highly available data store. It represents the complete deployment—including the primary node, standby replicas, and configuration—allowing the API to manage and monitor the cluster as a single unified resource.

Responses
201

Cluster successfully created.

application/json
idstring · uuidRequired

The ID (UUID) of the Cluster.

Example: e69b22a5-8fee-56b1-b6fb-4a07e4205ead
typestring · enumRequired

The type of the resource.

Possible values:
hrefstringRequired

The URL of the Cluster.

Example: /clusters/e69b22a5-8fee-56b1-b6fb-4a07e4205ead
propertiesone ofRequired

A MongoDB cluster is the top-level logical unit that groups one or more MongoDB server instances into a single, highly available data store. It represents the complete deployment—including the primary node, standby replicas, and configuration—allowing the API to manage and monitor the cluster as a single unified resource.

or
post/clusters
POST /v2/clusters HTTP/1.1
Host: mongodb.gb-bhx.ionos.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 802

{
  "metadata": {},
  "properties": {
    "name": "cms-prod",
    "description": "A cluster for the production CMS.",
    "version": "7",
    "connection": {
      "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
      "lanId": "2",
      "instanceAddresses": [
        "192.168.2.5/24",
        "192.168.2.6/24",
        "192.168.2.7/24"
      ]
    },
    "maintenanceWindow": {
      "time": "16:30:59",
      "dayOfTheWeek": "Monday"
    },
    "credentials": {
      "username": "my_db_user",
      "password": "P@ssw0rd123",
      "database": "my_database"
    },
    "restoreFromSnapshot": {
      "sourceSnapshotId": "a8784665-3d99-5464-af32-30a2967f58e7",
      "recoveryTargetDatetime": "2020-12-10T13:37:50+01:00"
    },
    "edition": "ENTERPRISE",
    "sharding": {
      "enabled": true,
      "shards": 2
    },
    "instances": {
      "count": 3,
      "ram": 8,
      "cores": 4,
      "storageSize": 10
    },
    "biConnectorEnabled": false,
    "logsEnabled": false,
    "metricsEnabled": false,
    "snapshot": {
      "location": "eu-south-2",
      "retentionDays": 90
    }
  }
}
{
  "id": "e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
  "type": "cluster",
  "href": "/clusters/e69b22a5-8fee-56b1-b6fb-4a07e4205ead",
  "metadata": {
    "createdDate": "2020-12-10T13:37:50+01:00",
    "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedDate": "2020-12-11T13:37:50+01:00",
    "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
    "state": "AVAILABLE",
    "statusMessage": "Provisioning failed: insufficient storage quota.",
    "connectionUri": "mongodb+srv://m-12abd343.mongodb.gb-bhx.ionoscloud.com"
  },
  "properties": {
    "name": "cms-prod",
    "description": "A cluster for the production CMS.",
    "version": "7",
    "connection": {
      "datacenterId": "5a029f4a-72e5-11ec-90d6-0242ac120003",
      "lanId": "2",
      "instanceAddresses": [
        "192.168.2.5/24",
        "192.168.2.6/24",
        "192.168.2.7/24"
      ]
    },
    "maintenanceWindow": {
      "time": "16:30:59",
      "dayOfTheWeek": "Monday"
    },
    "credentials": {
      "username": "my_db_user",
      "database": "my_database"
    },
    "edition": "ENTERPRISE",
    "sharding": {
      "enabled": true,
      "shards": 2
    },
    "instances": {
      "count": 3,
      "ram": 8,
      "cores": 4,
      "storageSize": 10
    },
    "biConnectorEnabled": false,
    "logsEnabled": false,
    "metricsEnabled": false,
    "snapshot": {
      "location": "eu-south-2",
      "retentionDays": 90
    }
  }
}

Last updated

Was this helpful?