Tasks API: Getting organized…

Google Tasks helps many of us to remember all those things that keep us busy. Towards the end of last year we asked our users what they wanted to see improved with Google Tasks and an overwhelming request was for the ability to access tasks from anywhere — be it on the move, on the desktop, or through their favorite Web apps.

Today, we’re checking off a big to-do from our list and are inviting you to try out the new Google Tasks API. Using the Google Tasks API, developers can — for the very first time — create rich applications which integrate directly with Google Tasks.

The Google Tasks API provides developers with a powerful set of API endpoints for retrieving and modifying Google Tasks content and metadata. It offers a simple, RESTful interface and supports all basic operations required to query, manage and sync a user’s tasks and task lists. The API uses JSON for data representation and works with multiple authentication mechanisms including OAuth 2.0.

Plain HTTP using JSON Using Google API Client Library for Java
POST /tasks/v1/lists/
/tasks
Content-Type: application/json
...
{ title: "Publish blog post" }
Task task = new Task();
task.setTitle("Publish
    blog post");
client.tasks.insert(
    "list-ID",
    task).execute();

Client libraries are provided for several major programming environments and should help you get up and running quickly.

The API is available in Labs and can be activated for your project through the API Console. Get started today by trying the Tasks API yourself using the API Explorer and taking a look at the documentation.


If you want to see the API in action check out the Google Tasks Chrome Extension. If you are at Google I/O we invite you to come along and hear the Google Tasks team talk about the new API today.

We thank the early adopters that have worked with us and built their own Google Tasks integrations over the last weeks. We’d like to highlight a few of them:

  • Producteev is a task management platform that lets teams and individuals access their to-dos from a lot of different locations (web, mobile, email, calendars…). You will now have all your Producteev’s tasks available in Google Tasks and vice versa!
  • Mavenlink‘s project collaboration suite allows you to communicate, share files, track time, invoice, and make or receive payments in one place. With its Google Tasks integration, your Mavenlink project tasks & Google Tasks always stay in sync.
  • Manymoon is the top installed social task and project management app in the Google Apps Marketplace and makes it simple to get work done online with co-workers, partners, and customers. Manymoon’s users can now create and view tasks with Gmail and Google Calendar through Google Tasks.
  • Zoho offers a suite of online business, collaboration and productivity applications for small businesses. So far they have integrated Zoho CRM & Zoho Projects with the Tasks API.

New Free-Busy feed for the Google Calendar API

There is now a convenient way to query free-busy information from Google Calendar. The new Google Calendar free-busy feed allows you to query blocks of busy time for one or multiple users, or for all the users subscribed to a Google Group in a single request.

This new Google Data feed is accessible through the URL pattern
https://www.google.com/calendar/feeds/default/freebusy/busy-times/userID
where “userID” is the email of the calendar you’d like to request the free-busy information of. The response will be an entry containing temporal blocks indicating the periods when the user is marked as busy in their Google Calendar. Visit our Developer’s Guide for more details and code samples about the free-busy feed.

You can also query free-busy information for multiple users in a single query using a batch request. The URL to use for such a batch request is:
https://www.google.com/calendar/feeds/default/freebusy/busy-times/batch

Below is a sample batch request, requesting free-busy information for Liz, Bob and Luke:

          http://www.google.com/calendar/feeds/default/freebusy/busy-times/liz%40example.com        http://www.google.com/calendar/feeds/default/freebusy/busy-times/bob%40example.com        http://www.google.com/calendar/feeds/default/freebusy/busy-times/luke%40example.com

This allows you, for example, to find common free time between multiple users in one single request to the Google Calendar API, which was not possible with previously existing feeds.

For example, the response from the batch request above would look like:

  https://www.google.com/calendar/feeds/default/freebusy/batch/1234  2010-03-13T00:00:00.000Z  

      http://www.google.com/calendar/feeds/default/freebusy/liz%40example.com     … updated, category, self link, author and batch info ...                                                  http://www.google.com/calendar/feeds/default/freebusy/bob%40example.com    … Free-busy entry content for Bob ...        http://www.google.com/calendar/feeds/default/freebusy/luke%40example.com    … Free-busy entry content for Luke ...

The response contains an entry for each requested calendar’s free-busy feed. Each of these entries contains blocks of time where the user is marked as busy in his Calendar for the next 24 hours.

Google Apps for Business domain users are also able to query free-busy information for all the members of a given Google Group in a single request. This feature is available through the following URL pattern:
https://www.google.com/calendar/feeds/default/freebusy/group/groupID/busy-times Where “groupID” is the email of the Google Group.

The response will be a feed containing the free-busy entries of each member of the group. To learn more about querying free-busy for groups please visit our Developer’s Guide.