Admin Repository
API Contract
REST
/api/v1/admin/data
7 endpoints
GET
/api/v1/admin/data/api/v1/admin/data/dashboard-stats
Fetch aggregated dashboard stats across multiple orgs
Public
Response Example
{
"data": {
"org_ids": [
"org_kNr8aQ",
"org_tY2zLm"
],
"active_mentors": 67,
"monthly_activities": 502,
"pending_reimbursements": 14,
"total_users": 291
}
}
GET
/api/v1/admin/data/api/v1/admin/data/users
Paged user list across multiple orgs with filters
Public
Response Example
{
"data": [
{
"user_id": "usr_hA3mXp",
"org_id": "org_kNr8aQ",
"full_name": "Astrid Haugen",
"role": "mentor",
"status": "active"
},
{
"user_id": "usr_bQ9vTk",
"org_id": "org_tY2zLm",
"full_name": "Lars Eriksen",
"role": "mentee",
"status": "active"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 291
}
}
GET
/api/v1/admin/data/api/v1/admin/data/activity-log
Paged activity log across multiple orgs with filters
Public
Response Example
{
"data": [
{
"activity_id": "act_rN5qYm",
"org_id": "org_kNr8aQ",
"user_id": "usr_hA3mXp",
"activity_type": "mentoring_session",
"description": "One-on-one session with mentee Lars Eriksen",
"occurred_at": "2026-03-18T14:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 502
}
}
GET
/api/v1/admin/data/api/v1/admin/data/org-nodes
Fetch flat list of org nodes under a root
Public
Response Example
{
"data": [
{
"org_id": "org_kNr8aQ",
"name": "Stavanger Region",
"parent_org_id": null,
"level": 0
},
{
"org_id": "org_tY2zLm",
"name": "Rogaland Nord",
"parent_org_id": "org_kNr8aQ",
"level": 1
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 6
}
}
POST
/api/v1/admin/data/api/v1/admin/data/users
Bulk-insert user records (internal use)
Public
Request Example
{
"org_ids": [
"org_kNr8aQ"
],
"users": [
{
"full_name": "Kari Olsen",
"email": "kari.olsen@company.no",
"role": "mentor"
}
]
}
Response Example
{
"data": {
"inserted": 1,
"skipped": 0,
"errors": []
}
}
PUT
/api/v1/admin/data/api/v1/admin/data/users/:id
Update a user record in the repository
Public
Request Example
{
"status": "inactive"
}
Response Example
{
"data": {
"user_id": "usr_hA3mXp",
"status": "inactive",
"updated_at": "2026-03-26T12:00:00Z"
}
}
DELETE
/api/v1/admin/data/api/v1/admin/data/users/:id
Hard-delete a user record from the repository (super-admin only)
Public
Response Example
{
"data": {
"user_id": "usr_hA3mXp",
"deleted": true
}
}