Google Tasks API

Tasks: list

Requires authorization

Returns all tasks in the specified task list. Try it now or see an example.

Request

HTTP Request

GET https://www.googleapis.com/tasks/v1/lists/tasklist/tasks

Parameters

Parameter Name Value Description
Required Parameters
tasklist string Task list identifier.
Optional Parameters
completedMax string Upper bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date.
completedMin string Lower bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date.
dueMax string Upper bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date.
dueMin string Lower bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date.
maxResults long Maximum number of task lists returned on one page. Optional. The default is 100.
pageToken string Token specifying the result page to return. Optional.
showCompleted boolean Flag indicating whether completed tasks are returned in the result. Optional. The default is True.
showDeleted boolean Flag indicating whether deleted tasks are returned in the result. Optional. The default is False.
showHidden boolean Flag indicating whether hidden tasks are returned in the result. Optional. The default is False.
updatedMin string Lower bound for a task's last modification time (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by last modification time.

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/tasks
https://www.googleapis.com/auth/tasks.readonly

Request Body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "tasks#tasks",
  "etag": string,
  "nextPageToken": string,
  "items": [
    tasks Resource
  ]
}
Property Name Value Description Notes
kind string Type of the resource. This is always "tasks#tasks".
etag string ETag of the resource.
nextPageToken string Token used to access the next page of this result.
items[] list Collection of tasks.

Examples

Note: The code examples available for this method do not represent all supported programming languages (see the client libraries page for a list of supported languages).

Java

Uses the Java client library

Tasks tasks = service.tasks.list("@default").execute();

for (Task task : tasks.getItems()) {
  System.out.println(task.getTitle());
}

PHP

Uses the PHP client library

$tasks = $service->listTasks('@default');

foreach($tasks->getItems() as $task) {
  echo $task->getTitle();
}

Python

Uses the Python client library

tasks = service.tasks().list(tasklist='@default').execute()

for task in tasks['items']:
  print task['title']

.NET

Uses the .NET client library

Tasks.v1.Data.Tasks tasks = service.Tasks.List("@default").Fetch();
if (tasks.Items != null)
{
  foreach (Task task in tasks.Items)
  {
    Console.WriteLine(task.Title);
  }
}

Try It!

Use the explorer below to call this method on live data and see the response. Alternatively, try the standalone explorer.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.