Monitoring
Recent authentication failures, the system health check and API usage statistics.
Recent authentication failures
/api/admin/monitoring/auth-failuresReturns failed admin logins, rejected session tokens and rejected API keys recorded in the audit log, newest first. attemptedActor is the Discord user id or the API key prefix when known; actorId is set when the credential resolved to a member. path is null for failed OAuth logins, which the callback service records instead of a route.
Authentication: Admin session token (Authorization: Bearer <token>)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dateFrom | query | string | no | Start date (ISO 8601) |
dateTo | query | string | no | End date (ISO 8601) |
limit | query | number | no | Max results (1-500, default 50) Default: 50. |
offset | query | number | no | Pagination offset Default: 0. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Authentication failures retrieved. | any |
400 | Invalid query parameters. | |
401 | Authentication required. | |
403 | System Admin access required. |
Open in Swagger (opens in a new tab)
System health check
/api/admin/monitoring/healthReturns health status for API, database, Redis, and Discord.
Authentication: Admin session token (Authorization: Bearer <token>)
Responses
| Status | Description | Body |
|---|---|---|
200 | Health status retrieved. | any |
401 | Authentication required. | |
403 | System Admin access required. |
Open in Swagger (opens in a new tab)
API usage statistics
/api/admin/monitoring/usageReturns request counts aggregated by period, project, and endpoint.
Authentication: Admin session token (Authorization: Bearer <token>)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
period | query | "7d" or "30d" or "90d" | no | Time period (default 30d) |
projectId | query | string | no | Filter by project ID |
Responses
| Status | Description | Body |
|---|---|---|
200 | Usage statistics retrieved. | any |
400 | Invalid query parameters. | |
401 | Authentication required. | |
403 | System Admin access required. |
Open in Swagger (opens in a new tab)
Source: apps/api/openapi.json.