Getting the list of all account tasks through API: get_all_tasks
Sample get_all_tasks request
https://your—domain.com/api/admin/v2/?action=get_all_tasks&hash=HASH
Returns data on all open and closed account tasks/subtasks
This request does not require page parameter
Optional parameters:
- show_subtasks=1 — returns child field (if available), which contains a list of subtasks in a similar format. There are 2 nesting levels available: task / subtask / sub-subtask
- extra — returns additional data on tasks/subtasks (can be specified with commas, for example extra=text,files):
- filter=active (other way status=active) — returns data only for open project tasks/subtasks. A separate value for closed tasks is not provided
text or html — description in text or html format, respectively
files — information about the files attached to the description
Returned data on tasks/subtasks:
- id — unique identifier
- name — task/subtask name
- page — task/subtask link (see link format for details)
- status — status (active/done — open/closed)
- priority — priority (value range: 0..10)
- user_from and user_to — information about the author and executive user
- project — information about the project (its id, name and page)
- text — text of the task/subtask description in text or html format (if the request contains corresponding extra parameter)
- date_added — creation date and time
- date_start — start date (if specified)
- date_end — due date or end date (if specified)
- date_closed — closing date and time
- time_end — due time or end time (if specified)
- max_time and max_money — time and financial estimates (if specified)
- tags — array in id: name format for task/subtask statuses and labels (if specified)
- files — information about the files attached in the description (if the request contains corresponding extra parameter):
- child — a similar array of data on subtasks and sub-subtasks included in the task (if the request contains show_subtasks=1 parameter)
id — unique file identifier (can be used in the download method for downloading via API)
size — file size (in bytes)
name — file name with its extension
page — part of the link for direct download (for the full path put the address of your account in front, for example
https://your-domain.worksection.com/download/123456)
https://your-domain.worksection.com/download/123456)
Sample JSON response
If the request succeeds, the response will contain ok status and the following data:
{
"status": "ok",
"data": [
{
"id": "TASK_ID",
"name": "TASK_NAME_1",
"page": "/project/PROJECT_ID/TASK_ID/",
"status": "done",
"priority": "0..10",
"user_from": {
"id": "USER_ID",
"email": "USER_EMAIL",
"name": "USER_NAME"
},
"user_to": {
"id": "USER_ID",
"email": "USER_EMAIL",
"name": "USER_NAME"
},
"project": {
"id": "PROJECT_ID",
"name": "PROJECT_NAME",
"page": "/project/PROJECT_ID/"
},
"text": "TASK_TEXT",
"date_added": "YYYY—MM—DD HH:II",
"date_start": "YYYY—MM—DD",
"date_end": "YYYY—MM—DD",
"date_closed": "YYYY—MM—DD HH:II",
"time_end": "HH:II",
"max_time": "50",
"max_money": "100",
"tags": {
"TAG_ID": "TAG_NAME_1",
"TAG_ID": "TAG_NAME_2"
},
"files": [
{
"id": "FILE_ID",
"size": "FILE_SIZE",
"name": "Example.docx",
"page": "/download/FILE_ID"
}
],
"child": [
{
"id": "SUBTASK_ID",
"name": "SUBTASK_NAME_1",
"page": "/project/PROJECT_ID/TASK_ID/SUBTASK_ID/",
... ... ...,
"child": [
{
"id": "SUBTASK_ID",
"name": "SUBTASK_NAME_2",
"page": "/project/PROJECT_ID/TASK_ID/SUBTASK_ID/",
... ... ...
}
]
}
]
},
{
"id": "TASK_ID",
"name": "TASK_NAME_2",
"page": "/project/PROJECT_ID/TASK_ID/",
... ... ...
}
]
}
Was this article helpful?
Yes, thank you!
No