WORKSECTION

Tasks

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
Except tasks with delayed publication

This request does not require page parameter

Optional parameters:
  • extra — returns additional data on tasks/subtasks (can be specified with commas, for example extra=text,files):
  • text or html — description in text or html format, respectively
    files — information about the files attached to the description
    relations — information about dependencies with other tasks
    subtasks — returns child field (if available) with a list of subtasks in a similar format. There are 2 nesting levels available: task / subtask / sub-subtask
    archive — returns tasks of archived projects
  • filter=active (other way status=active) — returns data only for open project tasks/subtasks. A separate value only for closed tasks is not provided

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):
  • 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)
  • child — a similar array of data on subtasks and sub-subtasks included in the task (if the 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"
                }
            ],
"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/subtask through API: get_task

Sample get_task request

https://your-domain.com/api/admin/v2/?action=get_task&
page=/project/PROJECT_ID/TASK_ID/SUBTASK_ID/&hash=HASH
Returns data on a selected open or closed project task/subtask
Except tasks with delayed publication

Required parameters:
  • page — task/subtask link (see link format for details)
Optional parameters:
  • extra — returns additional task/subtask data (can be specified with commas, for example extra=text,subscribers):
  • text or html — description in text or html format, respectively
    subscribers — subscriber list with user information
    files — information about the files attached to the description
    relations — information about dependencies with other tasks
    subtasks — for a task returns child field (if available) with a list of subtasks. There are 2 nesting levels available: task / subtask / sub-subtask
  • filter=active (other way status=active) — returns data only for open subtasks (when using extra=subtasks parameter). A separate value only for closed subtasks is not provided

Returned task/subtask data:
  • id — unique identifier
  • name — task/subtask name
  • 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)
  • parent — parent task dataset (if a subtask link is specified in page parameter)
  • 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 format 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):
  • 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)
  • subscribers — list of subscribers with information on them (if the request contains corresponding extra parameter)
  • relations — information about dependencies with other tasks (if the request contains corresponding extra parameter):
  • from — array of data for inbound dependencies:
    type — dependency type finish-to-start/start-to-start
    task — brief information on a linked task
    to — array of data for outbound dependencies (similar to from)
  • child — brief information on subtasks and sub-subtasks included in the task (if a task link is specified in page parameter 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

Getting the list of project tasks through API: get_tasks

Sample get_tasks request

https://your-domain.com/api/admin/v2/?action=get_tasks&
page=/project/PROJECT_ID/&hash=HASH
Returns data on all open and closed project tasks/subtasks
Except tasks with delayed publication

Required parameters:

Optional parameters:
  • extra — returns additional data on tasks/subtasks (can be specified with commas, for example extra=text,subscribers):
  • text or html — description in text or html format, respectively
    subscribers — subscriber list with user information
    files — information about the files attached to the description
    relations — information about dependencies with other tasks
    subtasks — returns child field (if available) with a list of subtasks in a similar format. There are 2 nesting levels available: task / subtask / sub-subtask
  • filter=active (other way status=active) — returns data only for open project tasks/subtasks. A separate value only for closed tasks is not provided

Returned data on tasks/subtasks:
  • id — unique identifier
  • name — task/subtask name
  • page — task/subtask link
  • 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 format 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):
  • 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)
  • subscribers — list of subscribers with information on them (if the request contains corresponding extra parameter)
  • relations — information about dependencies with other tasks (if the request contains corresponding extra parameter):
  • from — array of data for inbound dependencies:
    type — dependency type finish-to-start/start-to-start
    task — brief information on a linked task
    to — array of data for outbound dependencies (similar to from)
  • child — a similar array of data on subtasks and sub-subtasks included in the task (if the 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

Creating a task through API: post_task

Sample post_task request

https://your—domain.com/api/admin/v2/?action=post_task&
page=/project/PROJECT_ID/&email_user_from=USER_EMAIL&
title=TASK_NAME&hash=HASH

Creates a task in a specified project, regardless of its status (active, sleeping, archived)

This request allows adding files to a task description (see How to add files)


Required parameters:
  • page — project link (see link format for details)
  • email_user_from — task author email
  • title — task name

Optional parameters:
  • email_user_to — task executive email (ANY for "Anyone", NOONE or not specified for "Executive isn't assigned")
  • priority — priority (value range: 0..10)
  • text — task description
  • todo — checklist (for example: todo[]=case1&todo[]=case2)
  • datestart — start date in DD.MM.YYYY format
  • dateend — due date or end date in DD.MM.YYYY format
  • subscribe — comma separated list of user emails, who will be subscribed to a task
  • hidden — comma separated list of user emails, who will have access to this task, while it will be hidden for others
  • mention — comma separated list of user emails, who will be mentioned at the end* of the task description
    * random mention location is not supported
  • max_time — time estimates
  • max_money — financial estimates
  • tags — adds task statuses/labels (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

Closing a task through API: complete_task

Sample complete_task request

https://your-domain.com/api/admin/v2/?action=complete_task&
page=/project/PROJECT_ID/TASK_ID/&hash=HASH
Closes the specified task
Response will show corresponding error if the task is already closed or contains open subtasks

Required parameters:

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

https://your-domain.com/api/admin/v2/?action=reopen_task&
page=/project/PROJECT_ID/TASK_ID/&hash=HASH 
Reopens the specified task

Required parameters:

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

{
    "status": "ok"
}

Was this article helpful? Yes, thank you! No

Updating a task through API: update_task

Sample update_task request

https://your-domain.com/api/admin/v2/?action=update_task&
page=/project/PROJECT_ID/TASK_ID/&email_user_to=USER_EMAIL&
hash=HASH

Updates number of parameters for a specified open or closed task
All optional parameters are available for updating


Required parameters:

Optional parameters:
  • email_user_to — task executive email (ANY for "Anyone", NOONE or not specified for "Executive isn't assigned")
  • priority — priority (value range: 0..10)
  • title — task name
  • datestart — start date in DD.MM.YYYY format
  • dateend — due date or end 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 (changing/removing/adding) through the specified method:
  • email_user_from — task author email
  • text — task description
  • todo — checklist
  • subscribe — comma separated list of user emails, who will be subscribed to a task
  • hidden — comma separated list of user emails, who will have access to this task, while it will be hidden for others
  • tags — task statuses/labels (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

Searching tasks through API: search_tasks

Sample search_tasks request

https://your—domain.com/api/admin/v2/?action=search_tasks&
page=/project/PROJECT_ID/&filter=(name has 'Report' or name has 'Approval')
and (dateend>'25.05.2021' and dateend<'31.05.2021')&hash=HASH
Searches for tasks by one or several parameters
If page parameter is not specified, data of archive projects will be excluded from search results

At least one of the following parameters is required:
  • page — link to a project or a parent task (see link format for details)
  • email_user_from — task author email 
  • email_user_to — task executive email
  • filter — search query (see description below)
Optional parameters:
  • status — status (active/done — open/closed)

Integer fields:
  • id=TASK_ID — returns data of a specific task/subtask by its ID (can be obtained through get_all_tasks or get_tasks methods)
  • project=PROJECT_ID — returns data on tasks of a certain project by its ID (can be obtained through the get_projects method)
  • parent=TASK_ID — returns data on subtasks of a certain parent task by its ID (can be obtained through get_all_tasks or get_tasks methods)
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 or date_added — task creation date in 'DD.MM.YYYY' format
  • datestart or date_start — task start date in 'DD.MM.YYYY' format
  • dateend or date_end — task due date or end date in 'DD.MM.YYYY' format
  • dateclose or date_closed — 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