This commit is contained in:
seb
2026-10-19 01:50:32 +02:00
parent f571328e0c
commit c958ecf604
6 changed files with 191 additions and 6 deletions

View File

@@ -0,0 +1,45 @@
# `GET /health/latency`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Health latency history
Returns the database healthcheck latency (ms) as three series, each oldest first with unix-ms timestamps. `raw` holds the per-minute samples of the last 3 hours; `avg` and `max` hold the 30-minute aggregates (over the last 4 hours of samples) kept for 30 days. Requires a valid JWT; no company selection needed.
## Response `200`
Latency series
```json
{
"raw": [
{
"timestamp": 1,
"value": 1
}
],
"avg": [
{
"timestamp": 1,
"value": 1
}
],
"max": [
{
"timestamp": 1,
"value": 1
}
]
}
```
## Errors
| Status | Description |
|--------|-------------|
| 401 | Unauthorized |
| 500 | Redis read failed |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._