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.
Operation | Description |
---|---|
createTask | Creates a task. |
updateTask | Modifies a task. |
deleteTask | Deletes a task. |
getTask | Retrieves a task identified by its id. |
getAllTasks | Retrieves all tasks. |
getTasksOnProject | Retrieve all the tasks on a project. |
getTasksOnTaskList | Retrieve all the tasks on a task list |
reorderTasks | Reorder the Tasks. |
completeATask | The specified task is marked as complete. |
uncompleteATask | The 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.
<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.
{ "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.
<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.
{ "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.
<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.
{ "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.
<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.
{ "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 getAllTask
s operation retrieves all the tasks.
<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.
{ "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 getTask
sOnProject operation retrieves all the tasks on a project.
<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 getTask
sOnProject operation.
{ "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 getTask
sOnTaslList operation retrieves all the tasks on a task lists.
<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 getTask
sOnTaslList operation.
{ "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.
<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.
{ "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.
<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.
{ "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.
<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.
{ "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.
<?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>