# Retrieve Kafka Cluster User Credentials

The endpoint retrieves the credentials of a specific user of the Kafka cluster. It includes relevant access certificates and a key found within the metadata.

## Endpoint

`GET /clusters/{clusterId}/users/{userId}/access`

The `GET /clusters/{clusterId}/users/{userId}/access` endpoint retrieves the credentials necessary to configure access to your Kafka cluster. The credentials belong to the Kafka administrator user, giving administrators access to the Kafka cluster. The response includes detailed metadata about the access credentials of the admin user, including creation and modification timestamps, ownership information, and current operational state. Access credentials, including certificate authority, private key, and certificate, are provided to facilitate secure communication with the Kafka cluster. Use this endpoint to manage and obtain detailed information about Kafka admin user credentials within your Kafka infrastructure.

{% hint style="info" %}
**Note:** Each certificate is valid for 365 days. 30 days prior to the expiration date, a renewed certificate will be available for retrieval from this endpoint.
{% endhint %}

## Request

```bash
curl -X 'GET' \
  'https://kafka.de-txl.ionos.com/clusters/e69b22a5-8fee-56b1-b6fb-4a07e4205ead/users/d11db12c-2625-5664-afd4-a3599731b5af' \
--header 'Accept: 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                                                  |
| ----------------- | -------- | ------ | ------------------------------------------------------------ |
| `Accept`          | yes      | string | Set this to `application/json`.                              |
| `Authorization`   | yes      | string | Provide a header value as `Bearer` followed by your `token`. |
| {% endtab %}      |          |        |                                                              |

{% tab title="Request Path Parameters" %}

| Path Parameters | Required | Type   | Description                                                                                                          |
| --------------- | -------- | ------ | -------------------------------------------------------------------------------------------------------------------- |
| `clusterId`     | Yes      | string | <p>The UUID of the Kafka cluster.<br>Example: <code>/clusters/e69b22a5-8fee-56b1-b6fb-4a07e4205ead/topics</code></p> |
| `userId`        | Yes      | string | <p>The UUID of the Kafka user.<br>Example: <code>d11db12c-2625-5664-afd4-a3599731b5af</code></p>                     |
| {% endtab %}    |          |        |                                                                                                                      |
| {% endtabs %}   |          |        |                                                                                                                      |

## Response

```json
{
  "id": "d11db12c-2625-5664-afd4-a3599731b5af",
  "type": "user",
  "href": "/clusters/{clusterId}/users/d11db12c-2625-5664-afd4-a3599731b5af",
  "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",
    "certificateAuthority": "-----BEGIN CERTIFICATE ...",
    "privateKey": "-----BEGIN PRIVATE KEY ...",
    "certificate": "-----BEGIN CERTIFICATE ..."
  },
  "properties": {
    "name": "admin"
  }
}
```
