December 14th, 2021

Announcing the public preview of To Do Tasks API

At Microsoft Ignite 2021, we announced the private preview of To Do’s new Tasks API in Microsoft Graph. Today, we’re thrilled to announce the public preview of Tasks API on beta endpoint.

The Tasks API in Microsoft Graph helps bring users’ tasks from multiple sources such as Outlook emails, Teams chats, Office documents into one single place. The new endpoint me/tasks aligns with our vision of a single place for all tasks of a user. These APIs allow your apps to retrieve, create, and organize users’ tasks and task lists. 

The Tasks API provides the following key resources:

  1. Task list: Represents a logical container of task items. You can currently create tasks only within a Task list. Task items created without an explicitly specified list container will be created and appear in the default list named “Tasks. 
  2. Task: Represents a task, i.e. a piece of work, action or item that can be tracked and completed 
  3. Checklist item: Represents a way to allow splitting a task into smaller steps for easier tracking & completion of the parent task. 
  4. Linked resource: Represents an item from a partner application related to the task. You can use it to store information and the link back to the related item in your app. 

Image of key resources of the Tasks API

Added capabilities of new Tasks API

Along with the capabilities that are present in the existing To Do APIs, we are bringing the new capabilities to Tasks API.

  1. Retrieve all task for a user using AllTasks endpoint

AllTasks endpoint allows applications to get all tasks of a user in one single call. Further, applications can apply OData filters on the task properties to get only the relevant tasks. Application can also quickly create tasks in the default Tasks list from this endpoint.  

  1. Create steps using checklist item API

Application can now split a task into smaller steps that can be completed separately. This is helpful for better planning and tracking of complex tasks.

  1. Move tasks across lists

Using the new move operation on tasks, application can now move tasks across lists. Also, with support of immutable tasks ids, ids do not change during move operation within the mailbox.

Illustrative use of Tasks API

Here are some examples of how you can use the Tasks APIs in beta endpoint

  1. If you want to see all your tasks in the mailbox without any filter, call the API as shown below
GET https://graph.microsoft.com/beta/me/tasks/AllTasks
  1. You can also use any filter on this endpoint. For example, if you want to see all important tasks, call the following API
GET https://graph.microsoft.com/beta/me/tasks/AllTasks$filter=importance eq high
  1. To get tasks in a particular list, you can call the following endpoint
GET https://graph.microsoft.com/beta/me/tasks/lists/{list-id}/tasks

For more details, check out the documentation.

What’s Next?

Our roadmap beyond the GA release of this API includes adding support for categories, attachments, and application permission.

We can’t wait for you to try out this API as we continue to work towards improving user productivity. For any feedback, suggestions or questions on the API, you can reach out through this form or email us at todofeedback@microsoft.com.

Happy coding!

 

 

0 comments

Discussion are closed.