> 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/in-memory-db-api-versions.md).

# In-Memory DB API Versions

DBaaS In-Memory DB offers v2 and v1 APIs. **In-Memory DB v2** is the recommended version, introducing a unified Cluster resource model, in-place version upgrades, dedicated Snapshot Locations, and improved credential management compared to v1.

> **Important:** The [In-Memory DB v1 API](https://api.ionos.com/docs/in-memory-db/v1/) will be deprecated in an upcoming release. You must migrate existing v1 clusters to v2 as soon as the [DCD](https://docs.ionos.com/cloud/set-up-ionos-cloud/data-center-designer) supports In-Memory DB v2 cluster creation. Migration guidance will be provided at that time.

### What Changed in v2

#### Resource Model

| **Feature**            | **In-Memory DB v1 (1.0.0)**                                                                                   | **In-Memory DB v2 (2.0.0)**                                                                                                | **In-Memory DB v2 Advantage**                                                                                                  |
| ---------------------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **Top-level resource** | `ReplicaSet`, a deployment with a single instance or leader-follower replication determined by replica count. | `Cluster`, a fully managed deployment with a primary instance and optional passive replicas.                               | Renamed and clarified resource model. Standalone and replicated modes are now explicit rather than derived from replica count. |
| **Replication mode**   | Leader-follower with one active and n-1 passive replicas; mode determined implicitly by replica count.        | Asynchronous replication with one primary and up to four passive secondaries; standalone mode for single-node deployments. | Replication intent is now explicit in the resource model rather than inferred from a numeric field.                            |

#### Snapshots and Restore

| **Feature**            | **In-Memory DB v1 (1.0.0)**                                                                                                                                                     | **In-Memory DB v2 (2.0.0)**                                                                                                                                                                                                                                                                                                                      | **In-Memory DB v2 Advantage**                                                                                                       |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Restore**            | Dedicated `Restore` tag with explicit `/restores` endpoints for triggering and tracking restores. `initialSnapshotId` in the ReplicaSet body also supports create-time restore. | `restoreFromSnapshot` property on the Cluster resource, available in both `POST` (create from snapshot) and `PUT` (in-place restore, via `recoveryTargetDatetime`, with the source inferred). On `POST`, `sourceSnapshotId` selects the snapshot and an optional `recoveryTargetDatetime` picks the most recent snapshot at or before that time. | Unifies create-time and in-place restore into a single property on the cluster resource, eliminating the separate restore endpoint. |
| **Snapshot locations** | Not available; no control over where snapshots are stored.                                                                                                                      | Dedicated `SnapshotLocations` tag for querying available Object Storage regions.                                                                                                                                                                                                                                                                 | Enables geographic data safety by separating snapshot storage location from cluster location.                                       |

#### Versioning and Credentials

| **Feature**            | **In-Memory DB v1 (1.0.0)**                                             | **In-Memory DB v2 (2.0.0)**                                                                                                                                                                                                     | **In-Memory DB v2 Advantage**                                                                                       |
| ---------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **Version management** | No dedicated Versions endpoint; no in-place upgrade support.            | Dedicated `Versions` tag listing supported versions and upgrade paths via `canUpgradeTo`.                                                                                                                                       | Version upgrades are triggered by providing a new version value in a `PUT` request. Downgrades are not supported.   |
| **Credentials**        | Managed as part of the ReplicaSet resource via the `credentials` field. | Managed as part of the Cluster resource with explicit upsert behaviour. The user is created if it does not exist, or the password is updated if it does. Omitting credentials in a `PUT` leaves existing credentials unchanged. | Adds explicit upsert semantics, removing ambiguity about what happens when credentials are omitted or re-submitted. |

#### Authentication

| **Feature**       | **In-Memory DB v1 (1.0.0)** | **In-Memory DB v2 (2.0.0)** | **In-Memory DB v2 Advantage**                                                         |
| ----------------- | --------------------------- | --------------------------- | ------------------------------------------------------------------------------------- |
| **Authorization** | `tokenAuth` only.           | `tokenAuth` only.           | No change. Token-based authentication is required for all endpoints in both versions. |


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/api-reference/databases/v2/in-memory-db-api-versions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
