u
This commit is contained in:
45
docs/api/routes/health/latency.md
Normal file
45
docs/api/routes/health/latency.md
Normal 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`._
|
||||
Reference in New Issue
Block a user