Appearance
Tasks
TODO: Add description
List Tasks
Available on: NEXT.
http
GET /v2/projects/:project_node_id/tasksURL Parameters:
| Name | Type | Description |
|---|---|---|
project_node_id | string | Required. Project Node ID. |
Response:
Returns an array of Tasks
Create Task
Available on: NEXT.
Tasks are created on the project level.
http
POST /v2/projects/:project_id/tasksURL Parameters:
| Name | Type | Description |
|---|---|---|
project_id | string | Required. Project Node ID. |
Request Body:
| Name | Type | Description |
|---|---|---|
task_no | string | Task Number: example: 1.1.1, 1.1 |
task_name | string | Required. 200 Characters |
start_date | string | Datetime format |
end_date | string | Datetime format |
description | string | Required. 200 characters |
assignee_node_id | string | Node ID of the user to assign. |
Data Constraints:
- Project ID must exists
- User must be a member of the project
- When
assignee_node_idis not provided, the task will not be assigned and will not appear on My Tasks.
Get Tasks by ID
Available on: NEXT.
http
GET /v2/tasks/:id| Parameter | Type | Description |
|---|---|---|
id | string | Required. Task Node ID. |
List current tasks grouped by project
Available on: NEXT.
This endpoint returns the authenticated user's current tasks grouped by project, given a status.
http
GET /v2/tasks/my-tasks-by-project?status=1Query Parameters:
| Name | Type | Description |
|---|---|---|
status | number | Required. Filter tasks by status. See ProgressStatus for list of available status. |
tasks_limit | number | Optional. Limit the number of tasks to be returned. Default min: 5 Default max: 50 |
Response:
| Name | Type | Description |
|---|---|---|
project_id | string | Project Node ID. |
project_name | string | Project Name. |
my_tasks | array | Array of MyTask. |
Example Response:
json
[
{
"project_id": 6,
"project_node_id": "11c43cb7-5aca-4803-8131-08afdbc56600",
"project_name": null,
"my_tasks": [
{
"id": 2,
"task_name": "asd",
"node_id": "34879876-a464-4d03-aa92-fae703ea4a83",
"progress_report_node_id": "d3c77100-2bf1-4e3c-b345-f75ae443a59e",
"progress_report_id": 1,
"progress": 100
},
{
"id": 12,
"task_name": "asdasd",
"node_id": "30f4e7c7-fc87-4697-a3e6-751211a7a4fe",
"progress_report_node_id": "d3c77100-2bf1-4e3c-b345-f75ae443a59e",
"progress_report_id": 1,
"progress": 100
},
{
"id": 13,
"task_name": "asd",
"node_id": "e1d5e91a-39c0-4928-9a1d-c1d90291c350",
"progress_report_node_id": "d3c77100-2bf1-4e3c-b345-f75ae443a59e",
"progress_report_id": 1,
"progress": 100
}
]
}
]My Tasks
List My Tasks
Available on: NEXT.
Supports Offset Pagination
This endpoint returns the authenticated user's tasks.
- Only tasks that are assigned to the user will be returned.
- Tasks that are created by the user will not be included in the response.
http
GET /v2/tasks/my-tasksQuery Parameters:
| Name | Type | Description |
|---|---|---|
status | number | Optional. Filter tasks by status. See ProgressStatus for list of available status. |
Response:
Returns an array of Tasks
json
{
"controller": "v2/tasks/my-tasks",
"page": 1,
"per_page": 5,
"from": 0,
"to": 5,
"result": [
{
"id": 35,
"task_id": 0,
"parent_id": 0,
"task_name": "kkk",
"start_date": "2025-01-16T16:39:00.000Z",
"end_date": "2025-01-16T16:39:00.000Z",
"description": "",
"task_no": "",
"node_id": "Y7vWUfjZr6C9ESJs",
"createdAt": "2025-01-16T16:39:46.000Z",
"updatedAt": "2025-01-16T16:39:46.000Z",
"project": {
"id": 24,
"project_name": "1Test Create",
"description": "asdsad",
"node_id": "a4D5S3ELN9zcen6O"
},
"user": {
"id": 1,
"email": "example@example.com",
"avatar": "",
"node_id": "a6c374ee-17d6-4acf-ae2a-0b7eb09a38fd",
"full_name": "Full Name",
"first_name": "First Name",
"last_name": "Last Name",
"employee_no": "1"
},
"member": {
"id": 1,
"email": "example@example.com",
"avatar": "",
"node_id": "a6c374ee-17d6-4acf-ae2a-0b7eb09a38fd",
"full_name": "Full Name",
"first_name": "First Name",
"last_name": "Last Name",
"employee_no": "1"
}
}
]
}Update My Task
Available on: NEXT.
http
PATCH /v2/my-tasks/:task_assign_node_idURL Parameters:
| Name | Type | Description |
|---|---|---|
task_assign_node_id | string | Required. Task Assign Node ID. |
Request Body:
| Name | Type | Description |
|---|---|---|
project_node_id | string | Project Node ID. |
task_node_id | string | Task Node ID. |
task_name | string | Task Name. |
start_date | string | Date format in YYYY-MM-DD |
end_date | string | Date format in YYYY-MM-DD |
Notes
When changing the project:
- This is identified when there is a
project_node_idin the request bodytask_node_idis required in the request body- we need to need to get the project id from the task id that was provided. Do not trust the project id from the request. That is to ensure that the task is indeed part of the project.
- update the
task_assignrecord with the new project id and task id
- task_node_id is provided in the request body: This means, changing the task_id
- replace the task_node_id with the task id that was provided
- On dumb request, sometimes the project_node_id is also provided, this might fall on the project change logic.
- task_name is provided in the request body:
- When task_name is provided, we update the task name.
- We ignore the project_node_id and task_node_id in this case.
- What if all three are provided?
- We prioritize the project change, task change, and task name change in that order.
Interfaces
MyTask
| Name | Type | Description |
|---|---|---|
id | number | Task ID. |
task_name | string | Task Name. |
node_id | string | Task Node ID. |
progress_report_node_id | string | Progress Report Node ID. |
progress_report_id | number | Progress Report ID. |
progress | number | Progress percentage of task. Decimal number may occur. |