---
search:
  tags:
    - settings
    - PUT
seo:
  description: >-
    Saves the storage limit, or the default with 0,… Reference for the PUT
    /api/v1/settings/monitoring/storage-limit endpoint in the TimescaleDB
    Enterprise API.
sidebar:
  label: Set the metrics storage limit
  badge: PUT
title: Set the metrics storage limit
type: openapi-operation
---
Saves the storage limit, or the default with 0, and restarts the metrics engine with it. The charts have no new data for some seconds. A lower limit deletes the oldest metrics.

`PUT /api/v1/settings/monitoring/storage-limit`

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

- `bytes` (integer<int64>, required) — The storage limit in bytes, from storage\_limit\_min\_bytes to storage\_limit\_max\_bytes. 0 sets the default

Request body example:

```json
{
  "bytes": 0
}
```

**Responses**

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

Response example, 200:

```json
{
  "kept_seconds": 0,
  "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,
  "storage_full": true,
  "storage_limit_bytes": 0,
  "storage_limit_max_bytes": 0,
  "storage_limit_min_bytes": 0,
  "storage_limit_set_bytes": 0
}
```
