aboutsummaryrefslogtreecommitdiff
path: root/config.example.yaml
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-20 16:44:43 -0800
committerFuwn <[email protected]>2026-01-20 16:44:43 -0800
commitb56941ebd96a231d22a1316daa6b7e112478730e (patch)
treed7653d558ffaa27eb8e2022c95ac855ce6cc10df /config.example.yaml
parentfix: Update history bars (ping ticks) in API refresh mode (diff)
downloadkaze-b56941ebd96a231d22a1316daa6b7e112478730e.tar.xz
kaze-b56941ebd96a231d22a1316daa6b7e112478730e.zip
perf: Optimize API refresh to single /api/page request
Replace N+1 API calls (1 status + N history) with a single /api/page endpoint that returns all monitor data including history ticks. For 20 monitors: 21 requests -> 1 request per refresh interval. The /api/page endpoint is automatically public when refresh_mode=api, regardless of api.access setting, to ensure the page can always refresh.
Diffstat (limited to 'config.example.yaml')
-rw-r--r--config.example.yaml2
1 files changed, 2 insertions, 0 deletions
diff --git a/config.example.yaml b/config.example.yaml
index 89da0d7..624e1d0 100644
--- a/config.example.yaml
+++ b/config.example.yaml
@@ -370,6 +370,8 @@ incidents:
# GET /api/status - All monitors status JSON
# GET /api/monitor/{name} - Single monitor status JSON
# GET /api/history/{name} - Monitor history (supports ?mode=ping|minute|hour|day&count=N)
+# GET /api/page - Full page data (monitors + history + status) in one request
+# Note: Always public when refresh_mode is "api"
#
# Authentication (when access is "authenticated"):
# - Header: X-API-Key: your-secret-key