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.

OperationDescription
listTasksReturns all tasks in the specified task list.
getTaskReturns the specified task.
insertTaskCreates a new task in the specified task list.
deleteTaskDeletes the specified task from the task list.
updateTaskUpdates the specified task.
moveTaskMoves 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.
clearTaskClears 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.
patchTaskUpdates 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.

listTasks
<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 is True.
  • showDeleted: Flag indicating whether deleted tasks are returned in the result. The default is False.
  • showHidden: Flag indicating whether hidden tasks are returned in the result. The default is False.
  • 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. 

getTasks
<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.

insertTask
<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 either needsAction or completed.
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.

deleteTask
<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.

updateTask
<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 or completed.
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.

clearTask
<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.

moveTask
<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.

patchTask
<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