New endpoints: accessing My Tasks!

Hello developers, we have a new feature to announce: the API now properly exposes a user’s My Tasks! Previously, it was not possible to get a list of tasks assigned to a user in the same order they see them in the Asana web app, and moving things around within their My Tasks (for those of you who figured out how) was unintuitive and difficult to reason about.

Now, we have a dedicated endpoint to return the user’s My Tasks (called a user_task_list in the API), and an endpoint to return the tasks within the list. The order of these tasks matches the special grouping users see in the UI: first the “new” group, then “today,” “upcoming,” and “later.” You can also insert or reorder tasks in a user’s My Tasks, and the assignee_status on the task will be updated accordingly.

11 Likes

Hi @Joe_Trollo,

From my brief testing (and an earlier forum comment from Matt), it looks like once we obtain the ID of a user’s task list, it can be treated like a project ID in all project-based API calls. True?

And would this pertain to webhooks as well? I tried to use a My Tasks ID to get Events in API Explorer but couldn’t get it to return any events, so I’m thinking it’s a “no” on My Tasks webhooks?

1 Like

Good questions @Phil_Seeman. I would like to know this aswell. Been thinking about subscribing to webhooks of the personal “project”…

You can treat it as a normal project in other endpoints, but doing so may result in unintuitive behavior. For example, moving a task in a user’s My Tasks through the normal endpoints won’t put the task in the place you’d expect. (The reason we built the new endpoints in the first place is because the standard project endpoints behaved in confusing ways for My Tasks.)

You also can subscribe to event streams and webhooks on My Tasks, and those will behave exactly as they would for normal projects. For event streams, there is no GET /user_task_lists/<id>/events endpoint, but you can use the generic GET /events?resource=<id> endpoint.

OK, thanks, Joe. Not sure why it didn’t work when I tried to get Events, but good to know it should work, so I’ll try it again!

@Joe_Trollo, so I was able to (as far as I can tell) successfully create a webhook for My Tasks. When I make a change there, it looks like the webhook fires, but the Events array is always empty. Any thoughts on this? In case it helps:

MyTasks ID = 159278241464130
Workspace ID = 159278241464125
Webhook ID = 1107879013811766