You've already forked caddy-opnsense-blocker
Refine the dashboard and requests log UX
This commit is contained in:
46
docs/api.md
46
docs/api.md
@@ -25,7 +25,7 @@ Example response:
|
||||
|
||||
## `GET /api/overview`
|
||||
|
||||
Returns summary counters plus recent IP and recent event samples.
|
||||
Returns summary counters, chart data, and dashboard leaderboards.
|
||||
|
||||
Query parameters:
|
||||
|
||||
@@ -37,15 +37,6 @@ Query parameters:
|
||||
- optional
|
||||
- default: `24`
|
||||
- used for the top activity leaderboards returned in the same payload
|
||||
- `show_known_bots`
|
||||
- optional
|
||||
- default: `true`
|
||||
- when `false`, the leaderboards exclude IPs currently identified as known bots
|
||||
- `show_allowed`
|
||||
- optional
|
||||
- default: `true`
|
||||
- when `false`, the leaderboards exclude IPs whose current state is `allowed`
|
||||
|
||||
Main response fields:
|
||||
|
||||
- `total_events`
|
||||
@@ -55,8 +46,13 @@ Main response fields:
|
||||
- `allowed_ips`
|
||||
- `observed_ips`
|
||||
- `activity_since`
|
||||
- `top_ips_by_events`
|
||||
- `top_ips_by_traffic`
|
||||
- `activity_buckets`
|
||||
- `methods`
|
||||
- `bots`
|
||||
- `top_bot_ips_by_events`
|
||||
- `top_non_bot_ips_by_events`
|
||||
- `top_bot_ips_by_traffic`
|
||||
- `top_non_bot_ips_by_traffic`
|
||||
- `top_sources`
|
||||
- `top_urls`
|
||||
- `recent_ips`
|
||||
@@ -64,7 +60,7 @@ Main response fields:
|
||||
|
||||
## `GET /api/events`
|
||||
|
||||
Returns recent raw events.
|
||||
Returns a paginated slice of recent raw events.
|
||||
|
||||
Query parameters:
|
||||
|
||||
@@ -72,6 +68,30 @@ Query parameters:
|
||||
- optional
|
||||
- default: `100`
|
||||
- maximum: `1000`
|
||||
- `page`
|
||||
- optional
|
||||
- default: `1`
|
||||
- one-based page number
|
||||
- `show_known_bots`
|
||||
- optional
|
||||
- default: `true`
|
||||
- when `false`, verified bots are hidden from the log
|
||||
- `show_allowed`
|
||||
- optional
|
||||
- default: `true`
|
||||
- when `false`, rows whose current IP state is `allowed` are hidden
|
||||
- `review_only`
|
||||
- optional
|
||||
- default: `false`
|
||||
- when `true`, only requests whose current IP state is `review` are returned
|
||||
|
||||
Main response fields:
|
||||
|
||||
- `items`
|
||||
- `page`
|
||||
- `limit`
|
||||
- `has_prev`
|
||||
- `has_next`
|
||||
|
||||
Each event includes:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user