Analytics API π‘ BETA
The analytics family holds the routes mounted for counters, timeseries and dashboards.
Endpoints
Exact lines from the Generated api-analytics reference; the generated page is the full table.
| Method | Path |
|---|---|
| GET | /api/analytics/activity/recent |
| GET | /api/analytics/bots/performance |
| GET | /api/analytics/channels/distribution |
| POST | /api/analytics/chat |
| GET | /api/analytics/errors/count |
| GET | /api/analytics/llm/tokens |
| GET | /api/analytics/messages/count |
| GET | /api/analytics/queries/top |
Example
Minimal HTTP exchange for the first verified route (schemas are not modeled in the generated reference).
GET /api/analytics/activity/recent HTTP/1.1
Host: localhost:8080
Authorization: Bearer <token>
HTTP/1.1 200 OK
What it does
| Capability | Verified endpoint | Registered in |
|---|---|---|
| Recent activity | GET /api/analytics/activity/recent |
botserver/crates/botanalytics/src/routes.rs |
| Bots performance | GET /api/analytics/bots/performance |
botserver/crates/botanalytics/src/routes.rs |
| Channels distribution | GET /api/analytics/channels/distribution |
botserver/crates/botanalytics/src/routes.rs |
| Analytics chat | POST /api/analytics/chat |
botserver/crates/botanalytics/src/routes.rs |
| Errors count | GET /api/analytics/errors/count |
botserver/crates/botanalytics/src/routes.rs |
| Llm tokens | GET /api/analytics/llm/tokens |
botserver/crates/botanalytics/src/routes.rs |
| Messages count | GET /api/analytics/messages/count |
botserver/crates/botanalytics/src/routes.rs |
| Top queries | GET /api/analytics/queries/top |
botserver/crates/botanalytics/src/routes.rs |
Limits
- The Generated api-analytics reference is authoritative: no endpoint outside its table is inferred here.
- Routes require an authenticated session unless listed in the anonymous allowlist in
botsecurity-auth/src/auth_api/public_routes.rs. - The generated table does not model request or response fields; consult the mounted handler for them.
Related
- Generated api-analytics reference - Full verified route table.
- Chapter overview