Planfix API task.getList

From Planfix
Revision as of 12:45, 15 March 2024 by Dmitri (talk | contribs)
Jump to: navigation, search

A function for getting a list of tasks. Depending on the values ​​of the parameters, you can get a list of tasks sorted by different attributes. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="task.getList">
  <account></account>
  <sid></sid>
  <user>
    <id></id>
  </user>
  <target></target>
  <project>
    <id></id>
    <withSubprojects></withSubprojects>
  </project>
  <parent>
    <id></id>
  </parent>
  <sort></sort>
  <status></status>
  <pageCurrent></pageCurrent>
  <pageSize></pageSize>
  <filter></filter>
  <filters>
    <filter>
      <type></type>
      <operator></operator>
      <value></value>
      <field></field>
      ...
    </filter>
    ...
  </filters>
  <signature></signature>
</request>
Name Type Value Notes
user if this parameter is used, the result will be a list of tasks for the user specified only available for users with admin rights
user.id int user identifier
target enum / int incoming, outgoing, all, or set by task filter see below for available values
project project filter not required
project.id int project identifier
project.withSubprojects bool - 0/1 whether or not tasks from subprojects are included not required; default value is 0
parent parent task not required; if used, the list will be made up of tasks with the specified task as the parent task (from all sections of the tree below it)
parent.id int parent task identifier
sort enum type of sorting for a list of valid values, see the task sorting types section
status enum status for a list of valid values, see the task statuses section
pageCurrent int current page "0" is used to get the number of tasks
pageSize int size of the list to return (max. 100) the default value is "0"
filter set additional filter; see below for available values
filters additional complex filters for a list of available values and formats, see the task filters section


Possible values of the target parameter

Value Description Notes
all all default value
in incoming
out outgoing
template templates
periodic templates of recurring tasks
task filter identifier get a list of available task filters using the task.getFilterList task.getFilterList function


Possible values of the filter parameter

Value Description Notes
ACTIVE active tasks
OVERDUE overdue tasks
MY my tasks


The parameter value can be a combination of possible values, such as:

  <filter>ACTIVE MY</filter>


The result of executing the request is a list of my active tasks. When the function executes successfully, the response will look as follows:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <tasks count="count" totalCount="totalCount">
    <task>
      <id></id>
      <!-- ... -->
    </task>
    <!-- ... -->
  </tasks>
</response>
Name Type Value Notes
tasks root element, contains a list of tasks
tasks count int number of tasks returned as a result of executing the function
tasks totalCount int number of tasks meeting the request conditions
task task; for a description of this parameter, see the section on the response to retrieving a task card, keeping in mind that the task.getList function does not return auditors or task participants


Otherwise, an error response will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>


Go To