aboutsummaryrefslogtreecommitdiff
path: root/config.example.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'config.example.yaml')
-rw-r--r--config.example.yaml26
1 files changed, 26 insertions, 0 deletions
diff --git a/config.example.yaml b/config.example.yaml
index 93236df..228aecd 100644
--- a/config.example.yaml
+++ b/config.example.yaml
@@ -23,6 +23,18 @@ server:
host: "0.0.0.0"
port: 8080
+# API settings
+api:
+ # Access control for /api/* endpoints:
+ # "public" - Anyone can access (default)
+ # "private" - API endpoints return 403 Forbidden
+ # "authenticated" - Requires API key via X-API-Key header or ?api_key= query param
+ access: public
+ # API keys (only used when access is "authenticated")
+ # keys:
+ # - "your-secret-api-key-1"
+ # - "your-secret-api-key-2"
+
# Storage settings
storage:
path: "./kaze.db" # For Docker single-volume: use "./data/kaze.db" to store in mounted volume
@@ -340,3 +352,17 @@ incidents:
# identified - Root cause found
# monitoring - Fix applied, monitoring
# resolved - Issue resolved
+#
+# API access control:
+# api:
+# access: string - "public" (default), "private", or "authenticated"
+# keys: []string - List of valid API keys (for "authenticated" mode)
+#
+# Endpoints:
+# 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)
+#
+# Authentication (when access is "authenticated"):
+# - Header: X-API-Key: your-secret-key
+# - Query param: ?api_key=your-secret-key