• FAQ
  • API
  • Tasks
  • Getting the list of all account tasks through API: get_all_tasks

Getting the list of all account tasks through API: get_all_tasks


Sample get_all_tasks request

?action=get_all_tasks
Returns all incomplete and completed tasks of all projects
*except tasks with delayed publication
*subtasks can be returned with extra=subtasks parameter

Optional parameters:
  • extra — additional task info (can be specified with commas, for example extra=text,files):
  • text or html — description in text or html format
    files — attached files info (in task description)
    comments — five last comments
    relations — dependencies with other tasks
    subtasks — list of subtasks (in child dataset)
    archive — tasks of archived projects
  • filter=active — incomplete tasks (completed tasks filtering is not available)

Returned data:
  • id — task ID
  • name — task name
  • page — task link
  • status — state (active/done — incomplete/completed)
  • priority — priority (value range: 0..10)
  • user_from and user_to — task author and task executive
  • project — project info
  • text — task description in text or html format (if request contains corresponding extra parameter)
  • date_added — creation date and time
  • date_start — start date (if specified)
  • date_end — due date (if specified)
  • date_closed — closing date and time
  • time_end — due time (if specified)
  • max_time and max_money — time and financial estimates (if specified)
  • tags — array in id: name format for task tags (if specified)
  • files — attached files info (if request contains extra=files parameter):
  • id — file ID (can be used for downloading through download method)
    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://youraccount.worksection.com/download/123456)
  • relations — dependencies with other tasks (if request contains extra=relations parameter):
  • from — inbound dependencies:
    type — dependency type finish-to-start/start-to-start
    task — linked task
    to — outbound dependencies (similar to from)
  • child — subtasks data (if request contains extra=subtasks parameter)

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"
                }
            ],
            "relations": {
                "to": [
                    {
                        "type": "finish-to-start",
                        "task": {
                            "id": "SUBTASK_ID",
                            "name": "SUBTASK_NAME",
                            "page": "/project/PROJECT_ID/TASK_ID/SUBTASK_ID/",
                            "status": "active",
                            "priority": "0..10"
                        }
                    }
                ],
                "from": [
                    {
                        "type": "start-to-start",
                        "task": {
                            "id": "SUBTASK_ID",
                            "name": "SUBTASK_NAME",
                            "page": "/project/PROJECT_ID/TASK_ID/SUBTASK_ID/",
                            "status": "done",
                            "priority": "0..10"
                        }
                    }
                ]
            },
"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/", ... ... ... } ] }