API Reference
Admin Monitoring
System-wide monitoring endpoints for platform health, metrics, and audit logs.
Admin monitoring endpoints provide visibility into platform health, service metrics, and audit trails. All endpoints require ADMIN role and are scoped to the current tenant except for super-admin endpoints (internal use only).
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /admin/dashboard/stats | Aggregate stats for admin dashboard |
| GET | /admin/interviews/pending-approvals | List interviews awaiting approval |
| GET | /admin/audit-logs | Paginated audit log entries |
| GET | /admin/kafka/status | Kafka consumer group lag |
| GET | /admin/system/metrics | CPU, memory, request metrics |
GET /admin/dashboard/stats
Returns aggregate counts used by the admin dashboard overview page.
bash
curl http://localhost:3009/api/v1/admin/dashboard/stats \
-H "Authorization: Bearer <admin-jwt>"Response 200
{
"interviews": {
"total": 147,
"pendingApproval": 3,
"inProgress": 2,
"completedThisMonth": 18
},
"users": {
"total": 8,
"active": 7
},
"assessments": {
"pendingReview": 1,
"approvedThisMonth": 15
}
}GET /admin/interviews/pending-approvals
Returns all interviews in states requiring human action: INFO_NEEDED, PENDING, and ASSESSMENT_PENDING.
bash
curl http://localhost:3009/api/v1/admin/interviews/pending-approvals \
-H "Authorization: Bearer <admin-jwt>"Response 200
{
"data": [
{
"id": "interview-uuid",
"candidateName": "Jane Smith",
"position": "Senior Engineer",
"workflowState": "PENDING",
"waitingSince": "2024-01-15T10:45:00.000Z"
}
],
"counts": {
"infoNeeded": 1,
"pendingPlanApproval": 3,
"pendingAssessmentReview": 1
}
}GET /admin/audit-logs
Returns paginated audit log entries for all actions within the tenant.
bash
curl "http://localhost:3009/api/v1/admin/audit-logs?page=1&limit=50&action=INTERVIEW_APPROVED" \
-H "Authorization: Bearer <admin-jwt>"| Query Param | Type | Description |
|---|---|---|
| page | number | Page number (default: 1) |
| limit | number | Items per page (default: 50, max: 200) |
| action | string | Filter by action type |
| userId | string | Filter by actor user ID |
| from | ISO date | Start of date range |
| to | ISO date | End of date range |
Response 200
{
"data": [
{
"id": "log-uuid",
"action": "INTERVIEW_APPROVED",
"actor": {
"id": "user-uuid",
"email": "recruiter@example.com",
"role": "RECRUITER"
},
"resource": {
"type": "Interview",
"id": "interview-uuid"
},
"metadata": {
"previousState": "PENDING",
"newState": "APPROVED"
},
"timestamp": "2024-01-15T11:00:00.000Z"
}
],
"meta": {
"total": 243,
"page": 1,
"limit": 50
}
}GET /admin/kafka/status
Returns consumer group lag for each Kafka topic. High lag indicates a processing backlog.
Response 200
{
"consumerGroups": [
{
"groupId": "api-gateway-consumer",
"topics": [
{ "topic": "plan.generated", "lag": 0 },
{ "topic": "assessment.completed", "lag": 0 }
]
}
],
"brokerStatus": "CONNECTED",
"brokerUrl": "localhost:9092"
}For production deployments, expose these metrics to Prometheus via the
/api/v1/health/metrics endpoint and visualize with the provided Grafana dashboard templates.Was this page helpful?