> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/api-reference/databases/v2-2/mongodb-api-versions.md).

# MongoDB API Versions

MongoDB v2 is the current version of the MongoDB API. It replaces the MongoDB v1 API as clusters are migrated to the new DBaaS platform. It supports region-specific endpoints and idempotent cluster management through the Ensure pattern. It also provides dedicated snapshot location management, polymorphic Business and Enterprise clusters, and token-only authentication.

### What Changed in Version 2

The following tables highlight the key differences between MongoDB v1 and v2 APIs.

#### General API Architecture and Infrastructure

| **Feature**               | **MongoDB v1 (1.0.0)**                                                    | **MongoDB v2 (2.0.0)**                                                                                                             | **MongoDB v2 Advantage**                                                                                        |
| ------------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| **Server model**          | Single global base URL `https://api.ionos.com/databases/mongodb`          | Region-specific endpoints for Worcester and Newark.                                                                                | Reduces network latency for management operations.                                                              |
| **Update operation**      | `PATCH /clusters/{clusterId}` applies partial updates.                    | `PUT /clusters/{clusterId}` uses the Ensure pattern: provide the full resource object.                                             | Idempotent, declarative updates.                                                                                |
| **Snapshots**             | Nested under the cluster: `/clusters/{clusterId}/snapshots`.              | Top-level `/snapshots` resource, filterable by `clusterId`.                                                                        | Snapshots are easier to locate across clusters.                                                                 |
| **SnapshotLocations tag** | No dedicated snapshot location resource.                                  | New `SnapshotLocations` tag with dedicated endpoints.                                                                              | Explicit control over where snapshots are stored for geographic data safety.                                    |
| **Templates**             | `Templates` tag with `/templates`.                                        | Renamed to `InstanceTemplates`, with `/instance-templates`.                                                                        | Clearer naming; used by Business edition clusters.                                                              |
| **Versions**              | `Metadata` tag, `/versions` and `/infos/versions`.                        | `Versions` tag with `GET /versions` and `GET /versions/{versionId}`. Each version lists its lifecycle `status` and `canUpgradeTo`. | Clearer separation between API metadata and MongoDB software versions.                                          |
| **Restore**               | Dedicated `Restores` tag with `POST /clusters/{clusterId}/restore`.       | No dedicated restore endpoint. Restore is declared through `restoreFromSnapshot` on the cluster object.                            | Declarative restore model: restore intent is part of cluster configuration.                                     |
| **Logs**                  | Dedicated `Logs` tag with `/clusters/{clusterId}/logs`.                   | No `Logs` tag. Log and metrics forwarding is configured through `logsEnabled` and `metricsEnabled` on the cluster object.          | Logs and metrics route to the IONOS CLOUD Logging and Monitoring Services rather than through the database API. |
| **Users**                 | `Users` tag manages database users through `/clusters/{clusterId}/users`. | No `Users` tag. The initial user is created through the cluster `credentials` object.                                              | User creation is folded into cluster provisioning.                                                              |

#### Cluster Management

| **Feature**          | **MongoDB v1 (1.0.0)**                                                                                   | **MongoDB v2 (2.0.0)**                                                                                                     | **MongoDB v2 Advantage**                                            |
| -------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| **Cluster object**   | One cluster shape.                                                                                       | Two shapes, selected by `edition`: `ENTERPRISE` and `BUSINESS`. Edition-specific fields are required on their own variant. | Each edition validates against exactly the fields that apply to it. |
| **Lifecycle states** | Basic lifecycle states, such as `AVAILABLE`, `BUSY`, `DESTROYING`, `FAILED`, `UNKNOWN`, and `UPGRADING`. | Granular states: `PROVISIONING`, `AVAILABLE`, `UPDATING`, `DESTROYING`, and `FAILED`.                                      | More granular operational metadata.                                 |

#### Identity and Authentication

| **Feature**       | **MongoDB v1 (1.0.0)**                     | **MongoDB v2 (2.0.0)**     | **MongoDB v2 Advantage**                                      |
| ----------------- | ------------------------------------------ | -------------------------- | ------------------------------------------------------------- |
| **Authorization** | `basicAuth` and `tokenAuth` are supported. | Supports only `tokenAuth`. | Requests carry a Bearer token instead of account credentials. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/api-reference/databases/v2-2/mongodb-api-versions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
