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 Google Tasks
Overview
The following operations allow you to work with google tasks. Click an operation name to see details on how to use it.
Operation | Description |
---|---|
listTasks | Returns all tasks in the specified task list. |
getTask | Returns the specified task. |
insertTask | Creates a new task in the specified task list. |
deleteTask | Deletes the specified task from the task list. |
updateTask | Updates the specified task. |
moveTask | Moves the specified task to another position in the task list. This can include setting it as a child task under a new parent and/or moving it to a different position among its sibling tasks. |
clearTask | Clears all completed tasks from the specified task list. The affected tasks will be marked as hidden and will no longer be returned by default when retrieving all tasks for a task list. |
patchTask | Updates the specified task. This operation supports patch semantics. |
Operation details
Following is more information about each of the operations.
Listing all tasks in a task list
To list all tasks in a specified task list, use googletasks.listTasks
and specify the relevant properties.
<googletasks.listTasks> <tasklist_id>tasklist_id</tasklist_id> <completedMax>completedMax</completedMax> <completedMin>completedMin</completedMin> <dueMax>dueMax</dueMax> <dueMin>dueMin</dueMin> <maxResults>maxResults</maxResults> <pageToken>pageToken</pageToken> <showCompleted>showCompleted</showCompleted> <showDeleted>showDeleted</showDeleted> <showHidden>showHidden</showHidden> <updatedMin>updatedMin</updatedMin> </googletasks.listTasks>
Properties
tasklist_id
: String identifier of the task list from which the tasks are listed.completedMax
:Â Upper bound for a task's completion date (as a RFC 3339 timestamp) to filter by. The default is not to filter by completion date.completedMin
: Lower bound for a task's completion date (as a RFC 3339 timestamp) to filter by. The default is not to filter by completion date.dueMax
:Â Upper bound for a task's due date (as a RFC 3339 timestamp) to filter by. The default is not to filter by due date.dueMin
: Lower bound for a task's due date (as a RFC 3339 timestamp) to filter by. The default is not to filter by due date.maxResults
:Â Maximum number of task lists returned on one page. The default is 100.pageToken
:Â Token specifying the result page to return.showCompleted
:Flag indicating whether completed tasks are returned in the result. The default isTrue
.showDeleted
:Â Flag indicating whether deleted tasks are returned in the result. The default isFalse
.showHidden
:Â Flag indicating whether hidden tasks are returned in the result. The default isFalse
.updatedMin
:Â Lower bound for a task's last modification time (as a RFC 3339 timestamp) to filter by. The default is not to filter by the last modification time.
Related Google Tasks documentation
https://developers.google.com/google-apps/tasks/v1/reference/tasks/list
Getting a specified task
To retrieve a specified task from a task list, use googletasks.getTask
and specify the relevant properties.Â
<googletasks.getTask> <tasklist_id>tasklist_id</tasklist_id> <task_id>task_id</task_id> </googletasks.getTask>
Properties
tasklist_id
: String identifier of the task list from which the tasks are listed.task_id
: String identifier of the task to be retrieved.
Related Google Tasks documentation
https://developers.google.com/google-apps/tasks/v1/reference/tasks/get
Inserting a new task
To insert a new task to a task list, use googletasks.insertTask
and specify the relevant properties.
<googletasks.insertTask> <tasklist_id>tasklist_id</tasklist_id> <title>title</title> <completed>completed</completed> <deleted>deleted</deleted> <due>due</due> <hidden>hidden</hidden> <notes>notes</notes> <position>position</position> <status>status</status> </googletasks.insertTask>Â
This operation sends a REST request with a JSON object that includes the attribute values of the new task to the google tasks API. Successful invocation returns a response with a JSON payload that includes the details of the new task created.
Properties
tasklist_id
: String identifier of the task list into which the new task is inserted.title
: Title of the new task.completed
:Â Completion day of the task.deleted
:Â Flag indicating whether the task is deleted.due
:Â Due date of the new task.hidden
:Â Flag indicating whether the task is hidden.notes
: Notes related to the task.position
: Position of the new task.status
: Status of the new task. This can be eitherneedsAction
orcompleted.
Related Google Tasks documentation
https://developers.google.com/google-apps/tasks/v1/reference/tasks/insert
Deleting a task
 To delete a task, use googletasks.deleteTask
and specify the relevant properties.
<googletasks.deleteTask> <tasklist_id>tasklist_id</tasklist_id> <task_id>task_id</task_id> </googletasks.deleteTask>Â
Properties
tasklist_id
: String identifier of the task list in which the task to be deleted is stored.task_id
: String identifier of the task to be deleted.
Related Google Tasks documentation
https://developers.google.com/google-apps/tasks/v1/reference/tasks/delete
Updating a taskÂ
To update an existing task in a task list, use googletasks.updateTask
and specify the relevant properties.
<googletasks.updateTask> <tasklist_id>tasklist_id</tasklist_id> <task_id>task_id</task_id> <title>title</title> <completed>completed</completed> <deleted>deleted</deleted> <due>due</due> <hidden>hidden</hidden> <notes>notes</notes> <position>position</position> <status>status</status> </googletasks.updateTask>Â
This operation sends a REST request with a JSON object that includes the updated details of the task to the google tasks API. Successful invocation returns a response with a JSON payload that includes the details about the updated task.
Properties
tasklist_id
: String identifier of the task list into which the updated task is inserted.title
: Title of the updated task.completed
:Â Completion day of the task.deleted
:Â Flag indicating whether the task is deleted.due
:Â Due date of the new task.hidden
:Â Flag indicating whether the task is hidden.notes
: Notes related to the task.position
: Position of the updated task.status
: Status of the updated task. This can be eitherÂneedsAction
orcompleted
.
Related Google Tasks documentation
https://developers.google.com/google-apps/tasks/v1/reference/tasks/update
Clearing a task
To clear all completed tasks in a task list, use googletasks.clearTask
and specify the relevant properties.
<googletasks.clearTask> <tasklist_id>tasklist_id</tasklist_id> </googletasks.clearTask>Â
Properties
tasklist_id
: String identifier of the task list that is to be cleared.
Related Google Tasks documentation
https://developers.google.com/google-apps/tasks/v1/reference/tasks/clear
Moving a task
To move a task to a new position in a task list, use googletasks.moveTask
and specify the relevant properties.
<googletasks.moveTask> <tasklist_id>tasklist_id</tasklist_id> <task_id>task_id</task_id> <parent>parent</parent> <previous>previous</previous> </googletasks.moveTask>Â
Properties
tasklist_id
: String identifier of the task list in which the task to be moved is stored.task_id
: String identifier of the task to be moved.parent
:Â Parent task identifier. If the task is created at the top level, this parameter is omitted.previous
:Â Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted.Â
Related Google Tasks documentation
https://developers.google.com/google-apps/tasks/v1/reference/tasks/move
Updating a task with HTTP Patch semantics
To update a task according to the HTTP PATCH semantics, use googletasks.patchTask
and specify the relevant properties.
<googletasks.patchTask> <tasklist_id>tasklist_id</tasklist_id> <task_id>task_id</task_id> <title>title</title> <completed>completed</completed> <deleted>deleted</deleted> <due>due</due> <hidden>hidden</hidden> <notes>notes</notes> <position>position</position> <status>status</status> </googletasks.patchTask>Â
Properties
tasklist_id
: String identifier of the task list into which the updated task is inserted.title
: Title of the updated task.completed
:Â Completion day of the task.deleted
:Â Flag indicating whether the task is deleted.due
:Â Due date of the updated task.hidden
:Â Flag indicating whether the task is hidden.notes
: Notes related to the task.position
: Position of the updated task.status
: Status of the updated task. This can be eitherÂneedsAction
 orÂcompleted
.
Related Google Tasks documentation
https://developers.google.com/google-apps/tasks/v1/reference/tasks/patch