> This page is for API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# Configure Restore Account Metrics

PUT https://%7Baccount-domain%7D.console.eon.io/api/v1/projects/{projectId}/restore-accounts/{accountId}/metrics-config
Content-Type: application/json

Enables or updates the metrics configuration of the specified restore account.


Reference: https://docs.eon.io/api/api-reference/restore-connections/metrics/enable-restore-account-metrics-config

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `projectId` (string, required) — ID of the project whose restore account metrics you want to configure. You can get your project ID from the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.
- `accountId` (string, required) — Eon-assigned ID of the restore account.

### Body (application/json)

This endpoint expects an EnableRestoreAccountMetricsConfigRequest.

- `aws` (AwsAccountMetricsDestination, optional) — Metrics configuration for an AWS restore account.

## Response

### 200

Metrics configuration set.

- `restoreAccountConfig` (RestoreAccountMetricsConfig, required)

## Errors

### 404 Not Found Error

Restore account wasn't found.

- `any`

## Types

### AwsAccountMetricsDestination

- `region` (string, optional) — CloudWatch region to publish metrics to.

### RestoreAccountMetricsConfig

- `restoreAccountId` (string, required) — Eon-assigned restore account ID.
- `enabled` (boolean, required) — Indicates whether job metrics are enabled for the restore account. If `true`, job metrics are collected and can be queried.
- `destination` (AccountMetricsDestination, required) — Metrics destination settings.

### AccountMetricsDestination

- `aws` (AwsAccountMetricsDestination, optional) — AWS metrics destination settings.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "restoreAccountConfig": {
    "restoreAccountId": "9b76a8a2-a918-57e6-94d5-0316ebab663c",
    "enabled": true,
    "destination": {
      "aws": {
        "region": "us-east-1"
      }
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/projectId/restore-accounts/806f6781-1d66-4c7d-9f0e-e7da04e12541/metrics-config"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/projectId/restore-accounts/806f6781-1d66-4c7d-9f0e-e7da04e12541/metrics-config';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://{account-domain}.console.eon.io/api/v1/projects/projectId/restore-accounts/806f6781-1d66-4c7d-9f0e-e7da04e12541/metrics-config")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```