Google Tasks API

Tasks: clear

Requires authorization

Clears all completed tasks from the specified task list. The affected tasks will be marked as 'hidden' and no longer be returned by default when retrieving all tasks for a task list. Try it now or see an example.

Request

HTTP Request

POST https://www.googleapis.com/tasks/v1/lists/tasklist/clear

Parameters

Parameter Name Value Description
Required Parameters
tasklist string Task list identifier.

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

Request Body

Do not supply a request body with this method.

Response

If successful, this method returns an empty response body.

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

service.tasks.clear("taskListID").execute();

PHP

Uses the PHP client library

$service->clearTasks('taskListID', null);

Python

Uses the Python client library

service.tasks().clear(tasklist='taskListID').execute()

.NET

Uses the .NET client library

service.Tasks.Clear("taskListID").Fetch();

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.