diff options
| author | Fuwn <[email protected]> | 2026-01-20 16:54:15 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-20 16:54:15 -0800 |
| commit | cb8e8a750a275b9fae116cd01210e0ec50f62b55 (patch) | |
| tree | 5a8d985d706bd57cfaa3ee18c4bf8929f6895c71 /config.example.yaml | |
| parent | feat: Add new API endpoints (health, summary, uptime, incidents) (diff) | |
| download | kaze-cb8e8a750a275b9fae116cd01210e0ec50f62b55.tar.xz kaze-cb8e8a750a275b9fae116cd01210e0ec50f62b55.zip | |
feat: Add SVG status badge endpoint
GET /api/badge/{name}.svg - Shields.io style status badges (always public)
Options:
- ?label=Custom - Override the label text (default: monitor name)
- ?style=flat|plastic - Badge style (default: flat)
- ?type=status|uptime - Show status or uptime percentage (default: status)
Colors:
- Green (#22c55e) for up / >=99% uptime
- Yellow (#eab308) for degraded / >=95% uptime
- Red (#ef4444) for down / <95% uptime
- Gray (#9ca3af) for unknown
Example: 
Diffstat (limited to 'config.example.yaml')
| -rw-r--r-- | config.example.yaml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/config.example.yaml b/config.example.yaml index 706e3dc..91d17e9 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -379,6 +379,9 @@ incidents: # Supports ?period=1h|24h|7d|30d|90d (default: 24h) # GET /api/incidents - List incidents from config # Supports ?filter=all|active|resolved|scheduled (default: all) +# GET /api/badge/{name}.svg - SVG status badge (always public, shields.io style) +# Supports: ?label=custom&style=flat|plastic&type=status|uptime +# Example:  # # Authentication (when access is "authenticated"): # - Header: X-API-Key: your-secret-key |