# Fetch an In-Memory DB Instance

You can retrieve an In-Memory DB instance using its `UUID`. It is found in the response body when an In-Memory DB instance is created or when you retrieve a list of In-Memory DB instances using `GET`.

{% hint style="info" %}
**Note:**

* Remember to update your `UUID`. The sample `UUID` in the example is `498ae72f-411f-11eb-9d07-046c59cc737e`.
* Your instance runs in the default port **6379**. For more information, refer to the [<mark style="color:blue;">In-Memory DB documentation</mark>](https://redis.io/docs/latest/develop/connect/cli/).
  {% endhint %}

## Endpoint

Use a [<mark style="color:blue;">region-specific endpoint</mark>](https://docs.ionos.com/sections-test/guides/databases/in-memory-db/api-howtos/..#endpoints) from the list to fetch an instance: `https://in-memory-db.{region}.ionos.com/replicasets/{replicasetId}`

## Request

To query a single instance, you need the `id` from your `create` response.

```bash
curl -X 'GET' \
  'https://in-memory-db.de-txl.ionos.com/replicasets/498ae72f-411f-11eb-9d07-046c59cc737e' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer $Token' \
```

{% tabs %}
{% tab title="Request Header Parameters" %}
To make authenticated requests to the API, the following fields are mandatory in the request header:

| Header Parameters | Required |  Type  | Description                                                  |
| ----------------- | :------: | :----: | ------------------------------------------------------------ |
| `Authorization`   |    yes   | string | Provide a header value as `Bearer` followed by your `token`. |
| `Content-Type`    |    yes   | string | Set this to `application/json`.                              |
| {% endtab %}      |          |        |                                                              |

{% tab title="Path Parameters" %}
The following path parameter is mandatory: | Path Parameter | Required | Type | Description | | --------------------- | :------: | :-----: | --------------------------------------------------------------------------------------------------------------------------------- | | \`replicasetId\` | yes | string | The ID (UUID) of the ReplicaSet. Example: \`498ae72f-411f-11eb-9d07-046c59cc737e\`. |
{% endtab %}
{% endtabs %}

## Response

**202 Successful operation**

```json
{
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"type": "replicaset",
"href": "/replicasets/498ae72f-411f-11eb-9d07-046c59cc737e",
"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",
"message": "In progress.",
"dnsName": "in-memory-db.example.com"
},
"properties": {
"displayName": "In-Memory DB replica set",
"version": "7.2",
"replicas": 2,
"resources": {},
"persistenceMode": "None",
"evictionPolicy": "allkeys-lru",
"connections": [],
"maintenanceWindow": {},
"credentials": {},
"initialSnapshotId": "12345678-1234-1234-1234-123456789012"
}
}
```
