WORKSECTION

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/", ... ... ... } ] }
Was this article helpful? Yes, thank you! No

Getting the list of project tasks through API: get_tasks

Sample get_tasks request

?action=get_tasks&id_project=PROJECT_ID
Returns all incomplete and completed tasks of selected project
*except tasks with delayed publication
*subtasks can be returned with extra=subtasks parameter

Required parameters:
  • id_project — project ID

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 — subtasks list (in child dataset)
    subscribers — subscribers list
  • filter=active — incomplete tasks (completed tasks filtering is not available)

Returned data on tasks/subtasks:
  • 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)
  • subscribers — subscribers list (if request contains extra=subscribers parameter)
  • 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"
                }
            ],
            "subscribers": [
                {
                    "id": "USER_ID",
                    "email": "USER_EMAIL",
                    "name": "USER_NAME_1"
                },
                {
                    "id": "USER_ID",
                    "email": "USER_EMAIL",
                    "name": "USER_NAME_2"
                }
            ],
            "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/", ... ... ... } ] }
Was this article helpful? Yes, thank you! No

Getting a project task through API: get_task

Sample get_task request

?action=get_task&id_task=TASK_ID
Returns selected incomplete or completed (sub)task
*except (sub)tasks with delayed publication
*task along with its subtasks can be returned with extra=subtasks parameter

Required parameters:
  • id_task — task ID
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 — subtasks list (in child dataset)
    subscribers — subscribers list
  • filter=active — only incomplete subtasks (when using extra=subtasks parameter)
    Completed subtasks 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
  • parent — parent task (if request contains subtask ID)
  • 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)
  • subscribers — subscribers list (if request contains extra=subscribers parameter)
  • 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 (only if task ID is specified and request contains extra=subtasks parameter)

Sample JSON response
If the request succeeds, the response will contain ok status and the following data:

*for a task

{
    "status": "ok",
    "data": {
        "id": "TASK_ID",
        "name": "TASK_NAME",
        "page": "/project/PROJECT_ID/TASK_ID/",
        "status": "active",
        "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": "25",
        "max_money": "50",
        "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"   }  ],   "subscribers": [   {   "id": "USER_ID",  "email": "USER_EMAIL",   "name": "USER_NAME_1"
  },   {   "id": "USER_ID",  "email": "USER_EMAIL",   "name": "USER_NAME_2"   }   ], "relations": {
"to": [ { "type": "finish-to-start", "task": { "id": "TASK_ID", "name": "TASK_NAME",
"page": "/project/PROJECT_ID/TASK_ID/",
"status": "active", "priority": "0..10" } } ], "from": [ { "type": "start-to-start", "task": { "id": "TASK_ID",
"name": "TASK_NAME",
"page": "/project/PROJECT_ID/TASK_ID/",
"status": "done", "priority": "0..10" } } ] }, "child": [ { "id": "SUBTASK_ID", "name": "SUBTASK_NAME_1", "page": "/project/PROJECT_ID/TASK_ID/SUBTASK_ID/", "status": "active", "priority": "0..10", "child": [ { "id": "SUBTASK_ID", "name": "SUBTASK_NAME_2", "page": "/project/PROJECT_ID/TASK_ID/SUBTASK_ID/", "status": "done", "priority": "0..10" } ] } ] } }
*for a subtask/sub-subtask (identical response structure, only with additional parent dataset and without child dataset)

{
    "status": "ok",
    "data": {
        "id": "SUB-SUBTASK_ID",
        "name": "SUB-SUBTASK_NAME",
        "page": "/project/PROJECT_ID/TASK_ID/SUB-SUBTASK_ID/", 
        ... ... ...,
        "project": {
            ... ... ...
        },
        "parent": {
            "id": "SUBTASK_ID",
            "name": "SUBTASK_NAME",
            "page": "/project/PROJECT_ID/SUBTASK_ID/",
            "status": "active",
            "priority": "0..10",
            "parent": {
                "id": "TASK_ID",
                "name": "TASK_NAME",
                "page": "/project/PROJECT_ID/TASK_ID/",
                "status": "active",
                "priority": "0..10",
            }
        },
        "text": ...,
        ... ... ...
        "relations": {
            ... ... ...
        }
    }
}
Was this article helpful? Yes, thank you! No

Creating a task through API: post_task

Sample post_task request

?action=post_task&id_project=PROJECT_ID&title=TASK_NAME

Creates (sub)task in selected project
*allows files attaching to (sub)task description (see details)


Required parameters:
  • id_project — project ID
  • title — task name

Optional parameters:
  • id_parent — parent task ID (creating subtask)
  • email_user_from — task author email (will be set automatically if using access token)
  • email_user_to — task executive email, additional possible values: ANY – "Anyone", NOONE or not specified – "Executive isn't assigned"
  • priority — priority (value range: 0..10)
  • text — task description
  • todo⦋⦌ — checkbox item added to task description (combine several items to get checklist, example: todo⦋⦌=case1&todo⦋⦌=case2)
  • datestart — start date in DD.MM.YYYY format
  • dateend — due date in DD.MM.YYYY format
  • subscribe — user emails separated by commas, who will be subscribed to the task
  • hidden — user emails separated by commas, who will have access to this task, while it will be hidden for others
  • mention — user emails separated by commas, who will be mentioned at the end of the task description
  • max_time — time estimates
  • max_money — financial estimates
  • tags — task tags separated by commas (for example: tags=TAG1,TAG2)
    You can specify names (if they are unique) or their IDs (can be obtained through get_task_tags method)

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",
        "page": "/project/PROJECT_ID/TASK_ID/",
        "status": "active",
        "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",
        "max_time": 40,
        "max_money": 200, "tags": { "TAG_ID": "TAG_NAME_1", "TAG_ID": "TAG_NAME_2",
}
    }
}
Was this article helpful? Yes, thank you! No

Updating a task through API: update_task

Sample update_task request

?action=update_task&id_task=TASK_ID&email_user_to=USER_EMAIL

Updates selected incomplete or completed (sub)task parameters


Required parameters:
  • id_task — task ID

Optional parameters:
  • email_user_to — task executive email, additional possible values: ANY – "Anyone", NOONE or not specified – "Executive isn't assigned"
  • priority — priority (value range: 0..10)
  • title — task name
  • datestart — start date in DD.MM.YYYY format
  • dateend — due date in DD.MM.YYYY format
  • dateclosed — closing date in DD.MM.YYYY format
  • max_time — time estimates
  • max_money — financial estimates

Parameters unavailable for editing:
  • email_user_from — task author
  • text — task description
  • todo — checklist
  • subscribe — users, who will be subscribed to the task
  • hidden — users, who will have access to this task, while it will be hidden for others
  • tags — task tags (can be updated through update_task_tags method)

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",
        "page": "/project/PROJECT_ID/TASK_ID/",
        "status": "active",
        "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/"
        },
        "date_added": "YYYY-MM-DD HH:II",
        "date_start": "YYYY-MM-DD",
        "date_end": "YYYY-MM-DD", "max_time": 40, "max_money": 200, "tags": {   "TAG_ID": "TAG_NAME_1",
  "TAG_ID": "TAG_NAME_2"
}
    }
}
Was this article helpful? Yes, thank you! No

Closing a task through API: complete_task

Sample complete_task request

?action=complete_task&id_task=TASK_ID
Completes selected (sub)task

Required parameters:
  • id_task — task ID

Sample JSON response
If the request succeeds, the response will contain ok status

{
    "status": "ok"
}

Was this article helpful? Yes, thank you! No

Reopening a task through API: reopen_task

Sample reopen_task request

?action=reopen_task&id_task=TASK_ID
Reopens selected completed (sub)task

Required parameters:
  • id_task — task ID

Sample JSON response
If the request succeeds, the response will contain ok status

{
    "status": "ok"
}

Was this article helpful? Yes, thank you! No

Searching tasks through API: search_tasks

Sample search_tasks request

?action=search_tasks&id_project=PROJECT_ID&filter=(name has 'Report' or
name has 'Approval') and (dateend>'25.05.2021' and dateend<'31.05.2021')
Returns tasks that meet search query

Conditional parameters:
*at least one of them required
  • id_project — project ID
  • id_task — task ID
  • email_user_from — task author email 
  • email_user_to — task executive email
  • filter — search query (see description below)
Optional parameters:
  • status — task state, possible values: active/done — incomplete/completed
  • 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)

Integer fields:
  • id=TASK_ID — returns particular task
  • project=PROJECT_ID — returns tasks of a particular project
  • parent=TASK_ID — returns subtasks of a particular parent task
Equality and range operators for integer fields: =, in
project{=}2456
id {in} (1234, 1240)

String fields:
  • name — task name
Full or partial match for string fields: =, has
name{=}'Task Report'
name {has} 'Report'

Date fields:
  • dateadd — task creation date in 'DD.MM.YYYY' format
  • datestart — task start date in 'DD.MM.YYYY' format
  • dateend — task due date or end date in 'DD.MM.YYYY' format
  • dateclose — task closing date in 'DD.MM.YYYY' format
Relational operators for date fields: >, <, >=, <=, ! =, =
dateadd{=}'01.05.2021'


Query conditions can be combined with parentheses () and logical operations and, or (only in lowercase)

Sample filter query
&filter=(name has 'Report' or name has 'Approval') and
(dateend>'25.05.2021' and dateend<'31.05.2021')
Was this article helpful? Yes, thank you! No
esc
или
Print