Peer Mentor Stats Aggregator
API Contract
REST
/api/v1/peer-mentor-stats
4 endpoints
GET
/api/v1/peer-mentor-stats/api/v1/peer-mentor-stats/:peer_mentor_id
Get full aggregated stats for a peer mentor — used as input to badge evaluation
Auth Required
admincoordinatorpeer_mentorsystem
Response Example
{
"peer_mentor_id": "pm-kari-001",
"organisation_id": "org-nhf-oslo",
"activity_count": 34,
"current_streak_days": 12,
"training_completion_count": 7,
"session_count": 12,
"unique_mentees_count": 9,
"total_hours_mentored": 28.5,
"last_active_at": "2026-03-25T17:20:00Z",
"computed_at": "2026-03-26T00:00:00Z"
}
GET
/api/v1/peer-mentor-stats/api/v1/peer-mentor-stats/:peer_mentor_id/activity-count
Get total activity count for a peer mentor
Auth Required
admincoordinatorpeer_mentorsystem
Response Example
{
"peer_mentor_id": "pm-kari-001",
"activity_count": 34,
"computed_at": "2026-03-26T00:00:00Z"
}
GET
/api/v1/peer-mentor-stats/api/v1/peer-mentor-stats/:peer_mentor_id/streak
Get the current consecutive-day activity streak for a peer mentor
Auth Required
admincoordinatorpeer_mentorsystem
Response Example
{
"peer_mentor_id": "pm-kari-001",
"current_streak_days": 12,
"streak_started_at": "2026-03-14T00:00:00Z",
"last_active_at": "2026-03-25T17:20:00Z",
"longest_streak_days": 42,
"computed_at": "2026-03-26T00:00:00Z"
}
GET
/api/v1/peer-mentor-stats/api/v1/peer-mentor-stats/:peer_mentor_id/training-completions
Get the number of completed training modules for a peer mentor
Auth Required
admincoordinatorpeer_mentorsystem
Response Example
{
"peer_mentor_id": "pm-kari-001",
"training_completion_count": 7,
"completed_module_ids": [
"mod-intro-001",
"mod-active-listening-002",
"mod-crisis-support-003",
"mod-boundaries-004",
"mod-group-dynamics-005",
"mod-digital-wellbeing-006",
"mod-self-care-007"
],
"computed_at": "2026-03-26T00:00:00Z"
}