This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Tasks in Teamwork



Overview

The following operations allow you to work with tasks. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with attachments, see Sample configuration.

OperationDescription
createTaskCreates a task.
updateTaskModifies a task.
deleteTaskDeletes a task.
getTaskRetrieves a task identified by its id.
getAllTasksRetrieves all tasks.
getTasksOnProjectRetrieve all the tasks on a project.
getTasksOnTaskListRetrieve all the tasks on a task list
reorderTasksReorder the Tasks.
completeATaskThe specified task is marked as complete.
uncompleteATaskThe specified task is marked as incomplete.

Operation details

This section provides further details on the operations related to discussions.

Creating a task

The createTask operation creates a new task.

createTask
<teamwork.createTask>
    <taskListId>{$ctx:taskListId}</taskListId>
    <content>{$ctx:content}</content>
    <notify>{$ctx:notify}</notify>
    <description>{$ctx:description}</description>
    <dueDate>{$ctx:dueDate}</dueDate>
    <startDate>{$ctx:startDate}</startDate>
    <estimatedMinutes>{$ctx:estimatedMinutes}</estimatedMinutes>
    <private>{$ctx:private}</private>
    <priority>{$ctx:priority}</priority>
    <progress>{$ctx:progress}</progress>
    <attachments>{$ctx:attachments}</attachments>
    <pendingFileAttachments>{$ctx:pendingFileAttachments}</pendingFileAttachments>
    <responsiblePartyId>{$ctx:responsiblePartyId}</responsiblePartyId>
    <predecessorsId>{$ctx:predecessorsId}</predecessorsId>
    <predecessorsType>{$ctx:predecessorsType}</predecessorsType>
	<positionAfterTask>{$ctx:positionAfterTask}</positionAfterTask>
</teamwork.createTask>
Properties
  • taskListId: The id of the taskList.
  • content: The name of the task you are adding.

  • notify: Whether to notify people assigned to this task by email(true/false).

  • description: The description of the task.

  • dueDate: The due date of the task(YYYYMMDD).

  • startDate: The start date of the task(YYYYMMDD).

  • estimatedMinutes: The estimated number of minutes for a task to be completed.

  • private: The private status of the task.

  • priority: The priority of the task(low/medium/high).

  • progress: The progress of the task (0 to 90).

  • attachments: The attachments of the task.

  • pendingFileAttachments: The pending file attachments of the task.

  • responsiblePartyId: The responsible party id of the task.

  • predecessorsId: The id of the task that predeceases this task.

  • predecessorsType: The type of the predecessor task.

  • positionAfterTask: A task can be placed after another task by setting this parameter to a task id.

Sample Request

Following is a sample REST/JSON request that can be handled by the createTask operation.

Sample request for createTask
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "taskListId": "272411",
  "content": "testTask",
  "notify": "false",
  "description": "taskDescription",
  "dueDate": "20150405",
  "startDate": "20150202",
  "estimatedMinutes": "0",
  "private": "0",
  "priority": "low",
  "progress": "20",
  "attachments": "745098",
  "pendingFileAttachments": "tf_BC11BCB2-EFF5-D020-0457C3EDDD3B0491",
  "responsiblePartyId": "149195",
  "predecessorsType": "complete",
  "predecessorsId": "4244",
  "positionAfterTask": "-1"
}
Related Teamwork documentation

http://developer.teamwork.com/todolistitems#add_a_task

Updating a task

The updateTask operation updates a task.

createTask
<teamwork.updateTask>
    <taskId>{$ctx:taskId}</taskId>
    <content>{$ctx:content}</content>
    <notify>{$ctx:notify}</notify>
    <description>{$ctx:description}</description>
    <dueDate>{$ctx:dueDate}</dueDate>
    <startDate>{$ctx:startDate}</startDate>
    <private>{$ctx:private}</private>
    <priority>{$ctx:priority}</priority>
    <progress>{$ctx:progress}</progress>
    <estimatedMinutes>{$ctx:estimatedMinutes}</estimatedMinutes>
    <responsiblePartyId>{$ctx:responsiblePartyId}</responsiblePartyId>
    <attachments>{$ctx:attachments}</attachments>
    <taskListId>{$ctx:taskListId}</taskListId>
	<pendingFileAttachments>{$ctx:pendingFileAttachments}</pendingFileAttachments>
</teamwork.updateTask>
Properties
  • taskId: The id of the task.
  • taskListId: The id of the task list.
  • content: The name of the task you are adding.

  • notify: Whether to notify people assigned to this task by email(true/false).

  • description: The description of the task.

  • dueDate: The due date of the task(YYYYMMDD).

  • startDate: The start date of the task(YYYYMMDD).

  • estimatedMinutes: The estimated number of minutes for a task to be completed.

  • private: The private status of the task.

  • priority: The priority of the task(low/medium/high).

  • progress: The progress of the task (0 to 90).

  • attachments: The attachments of the task.

  • pendingFileAttachments: The pending file attachments of the task.

  • responsiblePartyId: The responsible party id of the task.

Sample Request

Following is a sample REST/JSON request that can be handled by the updateTask operation.

Sample request for updateTask
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "taskId": "1948247",
  "taskListId": "272411",
  "content": "testTask",
  "notify": "false",
  "description": "taskDescription",
  "dueDate": "20150405",
  "startDate": "20150202",
  "estimatedMinutes": "0",
  "private": "0",
  "priority": "low",
  "progress": "20",
  "attachments": "745098",
  "pendingFileAttachments": "tf_BC11BCB2-EFF5-D020-0457C3EDDD3B0491",
  "responsiblePartyId": "149195",
}
Related Teamwork documentation

http://developer.teamwork.com/todolistitems#edit_a_task

Deleting a task

The deleteTask operation deletes a task.

deleteTask
<teamwork.deleteTask>
    <taskId>{$ctx:taskId}</taskId>
</teamwork.deleteTask>
Properties
  • taskId: The id of the task.
Sample Request

Following is a sample REST/JSON request that can be handled by the deleteTask operation.

Sample request for deleteTask
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "taskId": "1948247"
}
Related Teamwork documentation

http://developer.teamwork.com/todolistitems#destroy_a_task

Retrieving a task

The getTask operation retrieves the task of given id.

getTask
<teamwork.getTask>
    <taskId>{$ctx:taskId}</taskId>
    <getFiles>{$ctx:getFiles}</getFiles>
    <dataSet>{$ctx:dataSet}</dataSet>
    <nestSubTasks>{$ctx:nestSubTasks}</nestSubTasks>
	<includeCompletedSubTasks>{$ctx:includeCompletedSubTasks}</includeCompletedSubTasks>
</teamwork.getTask>
Properties
  • taskId: The id of the task.
  • getFiles: Whether include files of the task(true/false).
  • dataSet: Whether include Smaller data sets of the task.
  • nestSubTasks: Whether include completed sub tasks nested within the parent task(true/false).
  • includeCompletedSubTasks: Whether include completed sub tasks(true/false).
Sample Request

Following is a sample REST/JSON request that can be handled by the getTask operation.

Sample request for deleteTask
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "taskId": "1948247"
  "getFiles": "true",
  "dataSet": "full",
  "nestSubTasks": "true",
  "includeCompletedSubTasks": "true"
}
Related Teamwork documentation

http://developer.teamwork.com/todolistitems#retrieve_a_task

Retrieving all tasks

The getAllTasks operation retrieves all the tasks.

getAllTasks
<teamwork.getAllTasks>
	<filter>{$ctx:filter}</filter>
    <page>{$ctx:page}</page>
    <pageSize>{$ctx:pageSize}</pageSize>
    <startDate>{$ctx:startDate}</startDate>
    <endDate>{$ctx:endDate}</endDate>
    <updatedAfterDate>{$ctx:updatedAfterDate}</updatedAfterDate>
    <showDeleted>{$ctx:showDeleted}</showDeleted>
    <includeCompletedTasks>{$ctx:includeCompletedTasks}</includeCompletedTasks>
    <includeCompletedSubTasks>{$ctx:includeCompletedSubTasks}</includeCompletedSubTasks>
    <creatorIds>{$ctx:creatorIds}</creatorIds>
    <include>{$ctx:include}</include>
    <responsiblePartyIds>{$ctx:responsiblePartyIds}</responsiblePartyIds>
    <sort>{$ctx:sort}</sort>
    <getSubTasks>{$ctx:getSubTasks}</getSubTasks>
    <nestSubTasks>{$ctx:nestSubTasks}</nestSubTasks>
    <getFiles>{$ctx:getFiles}</getFiles>
    <dataSet>{$ctx:dataSet}</dataSet>
    <includeToday>{$ctx:includeToday}</includeToday>
    <ignoreStartDates>{$ctx:ignoreStartDates}</ignoreStartDates>
</teamwork.getAllTasks>
Properties
  • filter: The filter for the task.

  • page: The page no.

  • pageSize: The number of records in a page.

  • startDate: Retrieve tasks filtered by the date of creation(YYYYMMDD).

  • endDate: Retrieve tasks filtered by the date of termination(YYYYMMDD).

  • updatedAfterDate: Retrieve tasks filtered by the time of update(YYYYMMDDHHMMSS).

  • showDeleted: Whether to include deleted tasks.

  • includeCompletedTasks: Whether include completed tasks(true/false).

  • includeCompletedSubTasks: Whether include completed subtasks(true/false).

  • creatorIds:Retrieve tasks made by a specific person or people.

  • include: The extra tasks that can be included with the filter option.

  • responsiblePartyIds: The responsible party ids of the task.

  • sort: The sort order of the task.

  • getSubTasks: Whether include sub tasks.

  • nestSubTasks: Whether completed sub tasks nested within the parent task.

  • getFiles: Whether include files of the task(true/false).

  • dataSet: Whether include smaller data sets of the task.

  • includeToday: Whether include today when using the filter option(true/false).

  • ignoreStartDates:Whether ignore start dates when using the filter option(true/false).

Sample Request

Following is a sample REST/JSON request that can be handled by the getAllTasks operation.

Sample request for getAllTasks
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "filter": "all",
  "page": "2",
  "pageSize": "30",
  "startDate": "20140402",
  "endDate": "20150512)",
  "updatedAfterDate": "20141123201022",
  "showDeleted": "yes",
  "includeCompletedTasks": "false",
  "includeCompletedSubTasks": "false",
  "creatorIds": "149195",
  "include": "nodate",
  "responsiblePartyId": "149195",
  "sort": "duedate",
  "getSubTasks": "yes",
  "nestSubTasks": "true",
  "getFiles": "true",
  "dataSet": "full",
  "includeToday": "true",
  "ignoreStartDates": "false"
}
Related Teamwork documentation

http://developer.teamwork.com/todolistitems#retrieve_all_task

Retrieving tasks on project

The getTasksOnProject operation retrieves all the tasks on a project.

getTasksOnProject
<teamwork.getTasksOnProject>
    <projectId>{$ctx:projectId}</projectId>
    <filter>{$ctx:filter}</filter>
    <page>{$ctx:page}</page>
    <pageSize>{$ctx:pageSize}</pageSize>
    <startDate>{$ctx:startDate}</startDate>
    <endDate>{$ctx:endDate}</endDate>
    <updatedAfterDate>{$ctx:updatedAfterDate}</updatedAfterDate>
    <showDeleted>{$ctx:showDeleted}</showDeleted>
    <includeCompletedTasks>{$ctx:includeCompletedTasks}</includeCompletedTasks>
    <includeCompletedSubTasks>{$ctx:includeCompletedSubTasks}</includeCompletedSubTasks>
    <creatorIds>{$ctx:creatorIds}</creatorIds>
    <include>{$ctx:include}</include>
    <responsiblePartyIds>{$ctx:responsiblePartyIds}</responsiblePartyIds>
    <sort>{$ctx:sort}</sort>
    <getSubTasks>{$ctx:getSubTasks}</getSubTasks>
    <nestSubTasks>{$ctx:nestSubTasks}</nestSubTasks>
    <getFiles>{$ctx:getFiles}</getFiles>
    <dataSet>{$ctx:dataSet}</dataSet>
    <includeToday>{$ctx:includeToday}</includeToday>
	<ignoreStartDates>{$ctx:ignoreStartDates}</ignoreStartDates>
</teamwork.getTasksOnProject>
Properties
  • projectId: The id for the project.

  • filter: The filter for the task.
  • page: The page no.

  • pageSize: The number of records in a page.

  • startDate: Retrieve tasks filtered by the date of creation(YYYYMMDD).

  • endDate: Retrieve tasks filtered by the date of termination(YYYYMMDD).

  • updatedAfterDate: Retrieve tasks filtered by the time of update(YYYYMMDDHHMMSS).

  • showDeleted: Whether to include deleted tasks.

  • includeCompletedTasks: Whether include completed tasks(true/false).

  • includeCompletedSubTasks: Whether include completed subtasks(true/false).

  • creatorIds:Retrieve tasks made by a specific person or people.

  • include: The extra tasks that can be included with the filter option.

  • responsiblePartyIds: The responsible party ids of the task.

  • sort: The sort order of the task.

  • getSubTasks: Whether include sub tasks.

  • nestSubTasks: Whether completed sub tasks nested within the parent task.

  • getFiles: Whether include files of the task(true/false).

  • dataSet: Whether include smaller data sets of the task.

  • includeToday: Whether include today when using the filter option(true/false).

  • ignoreStartDates:Whether ignore start dates when using the filter option(true/false).

Sample Request

Following is a sample REST/JSON request that can be handled by the getTasksOnProject operation.

Sample request for getTasksOnProject
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "projectId": "90538",
  "filter": "all",
  "page": "2",
  "pageSize": "30",
  "startDate": "20140402",
  "endDate": "20150512)",
  "updatedAfterDate": "20141123201022",
  "showDeleted": "yes",
  "includeCompletedTasks": "false",
  "includeCompletedSubTasks": "false",
  "creatorIds": "149195",
  "include": "nodate",
  "responsiblePartyId": "149195",
  "sort": "duedate",
  "getSubTasks": "yes",
  "nestSubTasks": "true",
  "getFiles": "true",
  "dataSet": "full",
  "includeToday": "true",
  "ignoreStartDates": "false"
}
Related Teamwork documentation

http://developer.teamwork.com/todolistitems#retrieve_all_task

Retrieving tasks on task list

The getTasksOnTaslList operation retrieves all the tasks on a task lists.

getTasksOnTaslList
<teamwork.getTasksOnTaslList>
    <taskListId>{$ctx:taskListId}</taskListId>
    <filter>{$ctx:filter}</filter>
    <page>{$ctx:page}</page>
    <pageSize>{$ctx:pageSize}</pageSize>
    <startDate>{$ctx:startDate}</startDate>
    <endDate>{$ctx:endDate}</endDate>
    <updatedAfterDate>{$ctx:updatedAfterDate}</updatedAfterDate>
    <showDeleted>{$ctx:showDeleted}</showDeleted>
    <includeCompletedTasks>{$ctx:includeCompletedTasks}</includeCompletedTasks>
    <includeCompletedSubTasks>{$ctx:includeCompletedSubTasks}</includeCompletedSubTasks>
    <creatorIds>{$ctx:creatorIds}</creatorIds>
    <include>{$ctx:include}</include>
    <responsiblePartyIds>{$ctx:responsiblePartyIds}</responsiblePartyIds>
    <sort>{$ctx:sort}</sort>
    <getSubTasks>{$ctx:getSubTasks}</getSubTasks>
    <nestSubTasks>{$ctx:nestSubTasks}</nestSubTasks>
    <getFiles>{$ctx:getFiles}</getFiles>
    <dataSet>{$ctx:dataSet}</dataSet>
    <includeToday>{$ctx:includeToday}</includeToday>
	<ignoreStartDates>{$ctx:ignoreStartDates}</ignoreStartDates>
</teamwork.getTasksOnTaslList>
Properties
  • taskListId: The id for the task list.

  • filter: The filter for the task.
  • page: The page no.

  • pageSize: The number of records in a page.

  • startDate: Retrieve tasks filtered by the date of creation(YYYYMMDD).

  • endDate: Retrieve tasks filtered by the date of termination(YYYYMMDD).

  • updatedAfterDate: Retrieve tasks filtered by the time of update(YYYYMMDDHHMMSS).

  • showDeleted: Whether to include deleted tasks.

  • includeCompletedTasks: Whether include completed tasks(true/false).

  • includeCompletedSubTasks: Whether include completed subtasks(true/false).

  • creatorIds:Retrieve tasks made by a specific person or people.

  • include: The extra tasks that can be included with the filter option.

  • responsiblePartyIds: The responsible party ids of the task.

  • sort: The sort order of the task.

  • getSubTasks: Whether include sub tasks.

  • nestSubTasks: Whether completed sub tasks nested within the parent task.

  • getFiles: Whether include files of the task(true/false).

  • dataSet: Whether include smaller data sets of the task.

  • includeToday: Whether include today when using the filter option(true/false).

  • ignoreStartDates:Whether ignore start dates when using the filter option(true/false).

Sample Request

Following is a sample REST/JSON request that can be handled by the getTasksOnTaslList operation.

Sample request for getTasksOnTaslList
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "taskListId": "272411",
  "filter": "all",
  "page": "2",
  "pageSize": "30",
  "startDate": "20140402",
  "endDate": "20150512)",
  "updatedAfterDate": "20141123201022",
  "showDeleted": "yes",
  "includeCompletedTasks": "false",
  "includeCompletedSubTasks": "false",
  "creatorIds": "149195",
  "include": "nodate",
  "responsiblePartyId": "149195",
  "sort": "duedate",
  "getSubTasks": "yes",
  "nestSubTasks": "true",
  "getFiles": "true",
  "dataSet": "full",
  "includeToday": "true",
  "ignoreStartDates": "false"
}
Related Teamwork documentation

http://developer.teamwork.com/todolistitems#retrieve_all_task

Reorder tasks

The reorderTasks operation order tasks on the specified task lists.

reorderTasks
<teamwork.reorderTasks>
    <taskListId>{$ctx:taskListId}</taskListId>
	<tasks>{$ctx:tasks}</tasks>
</teamwork.reorderTasks>
Properties
  • taskListId: The id for the task list.

  • tasks: The ids of task as json array.
Sample Request

Following is a sample REST/JSON request that can be handled by the reorderTasks operation.

Sample request for reorderTasks
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "taskListId": "272411",
  "tasks": [{"id":"1912304"},{"id":"1903127"}]
}
Related Teamwork documentation

http://developer.teamwork.com/todolistitems#reorder_the_tasks

Complete a task

The completeATask operation marks a specified task as complete.

completeATask
<teamwork.completeATask>
    <taskId>{$ctx:taskId}</taskId>
</teamwork.completeATask>
Properties
  • taskId: The id of the task.

Sample Request

Following is a sample REST/JSON request that can be handled by the completeATask operation.

Sample request for completeATask
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "taskId": "1948247"
}
Related Teamwork documentation

http://developer.teamwork.com/todolistitems#mark_a_task_compl

Un-complete a task

The uncompleteATask operation marks a specified task as incomplete.

uncompleteATask
<teamwork.uncompleteATask>
    <taskId>{$ctx:taskId}</taskId>
</teamwork.uncompleteATask>
Properties
  • taskId: The id of the task.

Sample Request

Following is a sample REST/JSON request that can be handled by the uncompleteATask operation.

Sample request for uncompleteATask
{
  "apiUrl":"https://wso2test.teamwork.com/",
  "apiKey":"clark42ceiling",
  "taskId": "1948247"
}
Related Teamwork documentation

http://developer.teamwork.com/todolistitems#mark_a_task_uncom

Sample configuration

Following is a sample proxy service that illustrates how to connect to Teamwork with the init operation and use the reorderTasks operation. The sample request for this proxy can be found in reorderTasks sample request. You can use this sample as a template for using other operations in this category.

Sample proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="tw_reorderTasks"
       transports="https http"
       startOnLoad="true"
       trace="disable">
   <description/>
   <target>
      <inSequence>
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="apiKey" expression="json-eval($.apiKey)"/>
         <property name="taskListId" expression="json-eval($.taskListId)"/>
         <property name="tasks" expression="json-eval($.tasks)"/>
         <teamwork.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiKey>{$ctx:apiKey}</apiKey>
         </teamwork.init>
         <teamwork.reorderTasks>
            <taskListId>{$ctx:taskListId}</taskListId>
            <tasks>{$ctx:tasks}</tasks>
         </teamwork.reorderTasks>
         <respond/>
      </inSequence>
      <outSequence/>
      <faultSequence/>
   </target>
</proxy>