Task assignments - assign tasks to members/groups/roles (تعيينات المهام)
17 endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /api/communities/{communityId}/tasks/{taskId}/assignments | Get task assignments (تعيينات المهمة) |
POST | /api/communities/{communityId}/tasks/{taskId}/assignments | Assign task (تعيين مهمة) |
DELETE | /api/communities/{communityId}/tasks/assignments/{assignmentId} | Remove assignment (إزالة التعيين) |
POST | /api/communities/{communityId}/tasks/assignments/{assignmentId}/approve | Approve a task the member sent («اعتماد») |
POST | /api/communities/{communityId}/tasks/assignments/{assignmentId}/request-help | Request help (طلب مساعدة) |
POST | /api/communities/{communityId}/tasks/assignments/{assignmentId}/resolve-help | Resolve help request (حل طلب المساعدة) |
POST | /api/communities/{communityId}/tasks/assignments/{assignmentId}/return | Return a submitted task to the member («إرجاع») |
PUT | /api/communities/{communityId}/tasks/assignments/{assignmentId}/status | Update assignment status (تحديث حالة التعيين) |
GET | /api/communities/{communityId}/tasks/assignments/{assignmentId}/submission | What the member handed in (طريقة الإكمال) |
POST | /api/communities/{communityId}/tasks/assignments/{assignmentId}/submission/files | Hand in a file for a «رفع ملف» task |
DELETE | /api/communities/{communityId}/tasks/assignments/{assignmentId}/submission/files/{fileId} | Remove a handed-in file before handing the task in |
GET | /api/communities/{communityId}/tasks/assignments/{assignmentId}/submission/files/{fileId} | Download a handed-in file |
GET | /api/communities/{communityId}/tasks/awaiting-approval | Tasks sent for approval, for the admin inbox (تسليمات للاعتماد) |
GET | /api/communities/{communityId}/tasks/help-requests | Get all help requests (طلبات المساعدة) |
GET | /api/communities/{communityId}/tasks/member-assignments/{memberId} | Get member's assignments (مهام العضو) |
GET | /api/communities/{communityId}/tasks/my-assignments | Get my task assignments (مهامي) |
GET | /api/communities/{communityId}/tasks/overdue | Overdue tasks for the admin inbox (مهام تجاوزت موعدها) |
GET /api/communities/{communityId}/tasks/{taskId}/assignmentsReturns all assignments for a specific task Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
— | — | no | — | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | List of assignments | object |
POST /api/communities/{communityId}/tasks/{taskId}/assignmentsAssigns a task to members, groups, or roles. Requires tasks:manage permission. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
— | — | no | — | — |
Request body (required) — application/json
Type: AssignTaskRequest
Responses
| Status | Description | Body |
|---|---|---|
201 | Assignments created | object |
403 | Requires tasks:manage permission | — |
DELETE /api/communities/{communityId}/tasks/assignments/{assignmentId}Removes an assignment from a task. Requires tasks:manage permission. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
— | — | no | — | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Assignment removed | — |
403 | Requires tasks:manage permission | — |
404 | Assignment not found | — |
POST /api/communities/{communityId}/tasks/assignments/{assignmentId}/approveFor a community task marked requiresApproval («تحتاج اعتماد») — a member's completion waits (IN_PROGRESS + submittedAt) until a manager approves it. Completes it, with points. Requires tasks:manage. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
— | — | no | — | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Completed | — |
403 | Requires tasks:manage | — |
409 | NOT_SUBMITTED (nothing waiting — or another manager decided first) / APPROVAL_NOT_REQUIRED | — |
POST /api/communities/{communityId}/tasks/assignments/{assignmentId}/request-helpSubmits a help request for an assignment. The admin will be notified. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
— | — | no | — | — |
Request body (required) — application/json
Type: RequestHelpRequest
Responses
| Status | Description | Body |
|---|---|---|
200 | Help request submitted | object |
403 | Can only request help for own assignment | — |
POST /api/communities/{communityId}/tasks/assignments/{assignmentId}/resolve-helpMarks a help request as resolved. Requires tasks:manage permission. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
— | — | no | — | — |
Request body — application/json
| Field | Type | Required | Description |
|---|---|---|---|
resolution | string | no | Resolution message (optional) |
Responses
| Status | Description | Body |
|---|---|---|
200 | Help request resolved | — |
403 | Requires tasks:manage permission | — |
404 | Assignment not found | — |
POST /api/communities/{communityId}/tasks/assignments/{assignmentId}/returnThe task stays in progress, no longer waiting; the member is notified with the optional note (≤ 300 characters). Requires tasks:manage. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
— | — | no | — | — |
Request body — application/json
| Field | Type | Required | Description |
|---|---|---|---|
note | string | no | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Returned | — |
403 | Requires tasks:manage | — |
409 | NOT_SUBMITTED | — |
PUT /api/communities/{communityId}/tasks/assignments/{assignmentId}/statusUpdates the status of an assignment. Members can update their own assignments. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
— | — | no | — | — |
Request body (required) — application/json
Type: UpdateAssignmentStatusRequest
Responses
| Status | Description | Body |
|---|---|---|
200 | Status updated | object |
403 | Can only update own assignment | — |
404 | Assignment not found | — |
GET /api/communities/{communityId}/tasks/assignments/{assignmentId}/submissionThe written answer of a «كتابة نص» task and the files of a «رفع ملف» task, on one assignment. The member himself or a tasks:manage holder; anyone else gets 404. Files are listed without storage keys — download them from the files route.
Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
assignmentId | path | yes | string | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | The submission | object |
404 | No such assignment, or not yours to read | — |
POST /api/communities/{communityId}/tasks/assignments/{assignmentId}/submission/filesOne file per request (multipart field file), PDF, JPG, PNG or WebP — the type is read from the file's bytes — up to 25 MB, at most 5 files per task. Only the member the task is assigned to, before he hands it in. Stored privately and counted against the community's storage.
Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
assignmentId | path | yes | string | — |
Request body (required) — multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
file | string (binary) | no | — |
Responses
| Status | Description | Body |
|---|---|---|
201 | The files now on the assignment | — |
400 | INVALID_SUBMISSION_FILE · SUBMISSION_FILES_NOT_ALLOWED · SUBMISSION_FILE_MISSING | — |
404 | Not your assignment | — |
409 | SUBMISSION_LOCKED (already handed in) · SUBMISSION_FILES_LIMIT | — |
413 | SUBMISSION_FILE_TOO_LARGE | — |
DELETE /api/communities/{communityId}/tasks/assignments/{assignmentId}/submission/files/{fileId}The member only, while the task is not completed or waiting for approval. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
assignmentId | path | yes | string | — |
fileId | path | yes | string | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | The files left | — |
404 | No such file, or not your assignment | — |
409 | SUBMISSION_LOCKED | — |
GET /api/communities/{communityId}/tasks/assignments/{assignmentId}/submission/files/{fileId}The member himself or a tasks:manage holder. Always an attachment, never cached. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
assignmentId | path | yes | string | — |
fileId | path | yes | string | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | The file | — |
404 | No such file, or not yours to read | — |
GET /api/communities/{communityId}/tasks/awaiting-approvalAssignments a member sent for approval that no one has approved or returned yet, oldest first. Community tasks marked requiresApproval always; members' private tasks only while the community supervises them. Requires tasks:manage permission.
Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
limit | query | no | integer | How many to return (total is always the full count) |
Responses
| Status | Description | Body |
|---|---|---|
200 | Waiting submissions | object |
403 | Requires tasks:manage permission | — |
GET /api/communities/{communityId}/tasks/help-requestsReturns all assignments where members have requested help. Requires tasks:manage permission. Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
— | — | no | — | — |
— | — | no | — | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | List of help requests | object |
403 | Requires tasks:manage permission | — |
GET /api/communities/{communityId}/tasks/member-assignments/{memberId}Returns all tasks assigned to 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 to view assignments for |
Responses
| Status | Description | Body |
|---|---|---|
200 | Member's assigned tasks with stats | MyTasksResponse |
403 | Requires tasks:manage permission | — |
GET /api/communities/{communityId}/tasks/my-assignmentsReturns all tasks assigned to the current user with statistics Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | User's assigned tasks with stats | MyTasksResponse |
GET /api/communities/{communityId}/tasks/overduePast-due, not-completed tasks that at least one assignee still owes, oldest due date first, with their section and heading. Requires tasks:manage permission.
Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
— | — | no | — | — |
limit | query | no | integer | How many tasks to return (total is always the full count) |
Responses
| Status | Description | Body |
|---|---|---|
200 | Overdue tasks | object |
403 | Requires tasks:manage permission | — |