Task analytics - leaderboards, stats, export (تحليلات المهام)
7 endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /api/communities/{communityId}/tasks/analytics/export | Export tasks (تصدير المهام) |
GET | /api/communities/{communityId}/tasks/analytics/leaderboard | Get task leaderboard (لوحة المتصدرين) |
GET | /api/communities/{communityId}/tasks/analytics/leaderboard/sections | Get sections leaderboard stats (إحصائيات الأقسام) |
GET | /api/communities/{communityId}/tasks/analytics/leaderboard/sections/{sectionId}/headings | Get headings leaderboard stats (إحصائيات العناوين) |
GET | /api/communities/{communityId}/tasks/analytics/members-progress | Members' task progress (تقدّم الأعضاء) |
GET | /api/communities/{communityId}/tasks/analytics/members/{memberId} | Get member analytics (تحليلات العضو) |
GET | /api/communities/{communityId}/tasks/analytics/overview | Get analytics overview (نظرة عامة على التحليلات) |
GET /api/communities/{communityId}/tasks/analytics/exportExports all tasks as CSV or Excel file. Requires tasks:manage permission. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
format | query | yes | enum: csv, excel | Export format |
Responses
| Status | Description | Body |
|---|---|---|
200 | File download | string (binary) |
403 | Requires tasks:manage permission | — |
GET /api/communities/{communityId}/tasks/analytics/leaderboardReturns members ranked by points earned from completed tasks Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
— | — | no | — | — |
— | — | no | — | — |
sectionId | query | no | string (uuid) | Filter by section |
headingId | query | no | string (uuid) | Filter by heading |
taskId | query | no | string (uuid) | Filter by specific task |
Responses
| Status | Description | Body |
|---|---|---|
200 | Ranked leaderboard entries | object |
GET /api/communities/{communityId}/tasks/analytics/leaderboard/sectionsReturns all sections with task statistics and top performers Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Sections with statistics | object |
GET /api/communities/{communityId}/tasks/analytics/leaderboard/sections/{sectionId}/headingsReturns all headings under a section with task statistics and top performers Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
— | — | no | — | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Headings with statistics | object |
GET /api/communities/{communityId}/tasks/analytics/members-progressEvery approved member of the community with their task progress, counted per individual assignment on active tasks (members with none are included with zeros). Names and avatars are the member's profile in this community. Requires tasks:manage.
Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | One row per approved member | object |
403 | Requires tasks:manage permission | — |
GET /api/communities/{communityId}/tasks/analytics/members/{memberId}Returns task analytics for a specific member. Requires tasks:manage permission. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
memberId | path | yes | string (uuid) | Member ID |
Responses
| Status | Description | Body |
|---|---|---|
200 | Member's task analytics | object |
403 | Requires tasks:manage permission | — |
404 | Member not found | — |
GET /api/communities/{communityId}/tasks/analytics/overviewTask statistics for the admin dashboard. Requires tasks:manage permission. The task-level fields (totalTasks, completionRate, tasksByStatus…) count a task COMPLETED only when every assignee finished it; assignments and sectionProgress count each assignment (one person's copy of one task), which is what the dashboard shows. Optional startDate / endDate filter by creation date (task creation for the task-level fields, assignment creation for the others).
Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Task analytics overview | object |
403 | Requires tasks:manage permission | — |