---
search:
  tags:
    - settings
    - PUT
seo:
  description: >-
    With mirroring on and a token, GET /metrics/federate… Reference for the PUT
    /api/v1/settings/monitoring/mirror endpoint in the TimescaleDB Enterprise
    API.
sidebar:
  label: Set metrics mirroring
  badge: PUT
title: Set metrics mirroring
type: openapi-operation
---
With mirroring on and a token, GET /metrics/federate gives each metric to a Prometheus that sends the token. Off, the endpoint answers 404. The token stays.

`PUT /api/v1/settings/monitoring/mirror`

**Request body** (`application/json`, required)

- `enabled` (boolean, required)

Request body example:

```json
{
  "enabled": true
}
```

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "mirror_enabled": true,
  "mirror_token_created_at": "2019-08-24T14:15:22Z",
  "mirror_token_set": true,
  "retention_days": 0,
  "retention_days_max": 0,
  "retention_days_min": 0,
  "storage_bytes": 0
}
```
