> ## Documentation Index
> Fetch the complete documentation index at: https://docs.molesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Incident insights

> Summarize incident volume, resolution time, and noise over a time window.

```http theme={null}
GET /api/v1/alerts/insights
```

Aggregates the incidents that were created within a window. The call requires `alerts.read`.

**Query parameters**

| Param | Type | Notes |
| - | - | - |
| `window_secs` | integer | The look-back window in seconds. Default `604800` (7 days). The value is clamped to 3600 through 31536000. |

```bash cURL theme={null}
curl "http://localhost:5080/api/v1/alerts/insights?window_secs=86400" \
  -H "authorization: Bearer $MS_JWT"
```

```json 200 theme={null}
{
  "window_secs": 86400,
  "total": 5,
  "active": 1,
  "closed": 4,
  "mttr_secs": 59.34,
  "noise_rate": 0.5,
  "by_hour": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  "by_severity": { "critical": 2, "error": 3 },
  "top_services": [{ "key": "checkout", "count": 3 }],
  "top_rules": [
    { "key": "3KEDBLvTYO6DnWi8H9S9MNLpPT7", "count": 3 },
    { "key": "3KEDviJWhe5wIf6gnQyS8kucGhJ", "count": 2 }
  ]
}
```

**Response**

| Field | Notes |
| - | - |
| `window_secs` | The window after clamping. |
| `total` | The number of incidents created in the window. |
| `active` | Incidents with the status `open` or `acknowledged`. |
| `closed` | Incidents with the status `resolved` or `closed`. |
| `mttr_secs` | The mean time in seconds from creation to resolution over the resolved incidents. `0` when none is resolved. |
| `noise_rate` | The fraction from 0 to 1 of resolved incidents that were resolved within 60 seconds. `0` when none is resolved. |
| `by_hour` | 24 counts of incidents by the UTC hour of creation. |
| `by_severity` | The count per severity. Severities without incidents are absent. |
| `top_services`, `top_rules` | Up to 8 entries of `key` and `count`, highest first. The key is a service name or a rule identifier. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.