# User Task Lists

**URL:** <https://forum.asana.com/t/user-task-lists/89985>\
**Category:** API & Developers\
**Tags:** my-tasks, api, tasks\
**Created:** [26 July 2020 20:52 UTC](https://forum.asana.com/t/user-task-lists/89985 "2020-07-26T20:52:14Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ani\_Aggarwal](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ani_aggarwal/32/59112_2.png) [@Ani\_Aggarwal](https://forum.asana.com/u/Ani_Aggarwal)\
**Post date:** [26 July 2020 20:52 UTC](https://forum.asana.com/t/user-task-lists/89985/1 "2020-07-26T20:52:14Z")

</div>

Hi,

# Background and Use Case

I am using Asana’s API to retrieve _ **all** _ tasks in an organization. I am using an enterprise level subscription with a service account for retrieving tasks. I am able to retrieve all tasks within projects in the organization, but I run into some issues with the private “My Tasks” lists.

Using Curl, I am able to retrieve tasks in the user task list using the service account, even if the tasks are private and have no project. However, I cannot retrieve these without the gid, which I am currently accessing though the browser. It appears there is no easy way to access these task lists through code.

# My question

Is there an easy, efficient way to get _ **all** _ tasks in a project, including personal task lists?

## Current Workaround

I believe this should work but I have yet to test it

1. Enumerating each user in the organization, then getting their personal task lists.

2. Enumerate each task in their personal tasks which is not already associated with a project in the organization.

3. Continue with working strategy I am currently using:  
a. Enumerate all projects in organization  
b. Enumerate all tasks in each project

This strategy should avoid double counting any two tasks but still get all tasks. However, this is a very long, roundabout way of achieving this. Is there an easier way?

#### Thanks in advance,

Ani

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [26 July 2020 21:34 UTC](https://forum.asana.com/t/user-task-lists/89985/2 "2020-07-26T21:34:40Z")

</div>

Hi Ani,

When you say

> [@Ani\_Aggarwal](#):
>
> I cannot retrieve these without the gid,

are you referring to tasks or user task lists (UTLs) that you can’t retrieve; and are you referring to a UTL gid or task gid?

I’m trying to follow your description but need some clarification.

---

<div class="post-metadata">

**Author:** ![Ani\_Aggarwal](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ani_aggarwal/32/59112_2.png) [@Ani\_Aggarwal](https://forum.asana.com/u/Ani_Aggarwal)\
**Post date:** [28 July 2020 22:00 UTC](https://forum.asana.com/t/user-task-lists/89985/3 "2020-07-28T22:00:21Z")

</div>

Hi Phil,

I am refering to UTLs that are called “My Tasks” in the UI.

Let me know if you need more clarification.

Ani

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [29 July 2020 01:48 UTC](https://forum.asana.com/t/user-task-lists/89985/4 "2020-07-29T01:48:50Z")

</div>

I don’t think there’s an easier way. I think the approach you describe would be the way to do it, I can’t think of a good alternative.

---

<div class="post-metadata">

**Author:** ![Ani\_Aggarwal](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ani_aggarwal/32/59112_2.png) [@Ani\_Aggarwal](https://forum.asana.com/u/Ani_Aggarwal)\
**Post date:** [29 July 2020 02:22 UTC](https://forum.asana.com/t/user-task-lists/89985/5 "2020-07-29T02:22:44Z")

</div>

Thanks for you response. I will be sure to update this post if I find an easier way.

---

<div class="post-metadata">

**Author:** ![Frederic\_Malenfant](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/frederic_malenfant/32/8358_2.png) [@Frederic\_Malenfant](https://forum.asana.com/u/Frederic_Malenfant)\
**Post date:** [31 July 2020 00:54 UTC](https://forum.asana.com/t/user-task-lists/89985/6 "2020-07-31T00:54:59Z")

</div>

> [@Ani\_Aggarwal](#):
>
> efficient way to get _ **all** _ tasks in a project

I think you mean, in an organization?

Let’s start there:  
1 task can be assigned to 0 or 1 user, set to 0 or many projects, and 0 or many tags.

So, 1 task, can have 0 user / 0 project / 0 tags, or 1 user 3 projects 6 tags.

That said… from that endpoint:  
[https://developers.asana.com/docs/get-multiple-tasks](https://developers.asana.com/docs/get-multiple-tasks)  
You can get tasks by user / by project / by tag.  
If your task is set on 3 projects, you will retrieve it 3 times. + 1 if assigned to 1 user, + x if set to 1 or many tags.

Also, there’s more…  
If 1 subtask is opened and set to a project / user / tag, that subtask will be retrieved when querying these endpoints.

Also, there’s the “floating” tasks, those who have 0 user / 0 project / 0 tags… that are absolutely impossible to get from that endpoint.

The solution is to use the “search” endpoint.

[https://developers.asana.com/docs/search-tasks-in-a-workspace](https://developers.asana.com/docs/search-tasks-in-a-workspace)

Using that, you will never retrieve tasks multiple times.

You can query:  
GET /workspaces/{workspace\_gid}/tasks/search??is\_subtask=false (or any other…).  
The first time you download all tasks, use paging by blocs of 100, sorted by “?created\_at”.

Then, query each next page using “=created\_at.before=” (last modified date of the previous page).

Finally, store all these tasks somewhere on your server.

Then, next time you need to update your list, use the same endpoint,  
but add the "?modified\_at.after=yyyy-mm-ddThh:mm:ss (last time you run your script)

---

<div class="post-metadata">

**Author:** ![Ani\_Aggarwal](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ani_aggarwal/32/59112_2.png) [@Ani\_Aggarwal](https://forum.asana.com/u/Ani_Aggarwal)\
**Post date:** [31 July 2020 02:47 UTC](https://forum.asana.com/t/user-task-lists/89985/7 "2020-07-31T02:47:40Z")

</div>

> [@Frederic\_Malenfant](#):
>
> I think you mean, in an organization?

You are right, typo.

Thanks for the very detailed response. This seems to be the solution to my problem so I have marked it as such.

### I have a just one more question:

You say to use pagination, in your explaination:

> [@Frederic\_Malenfant](#):
>
> use paging by blocs of 100

According to the link you provided, [Search tasks in a workspace](https://developers.asana.com/docs/search-tasks-in-a-workspace), the following is true about pagination when using the search.

> [@](#):
>
> Search results are not stable; repeating the same query multiple times may return the data in a different order, even if the data do not change. Because of this, the traditional [pagination](https://developers.asana.com/docs/#pagination) available elsewhere in the Asana API is not available here. However, you can paginate manually by sorting the search results by their creation time and then modifying each subsequent query to exclude data you have already seen. Page sizes are limited to a maximum of 100 items, and can be specified by the `limit` query parameter.

Just to make sure I understand, in your explanation you sort by date, and as such you are not only able to use pagination, but you are also able to minimize time spent to get tasks by using a last modified date to only get recently added (or changed/deleted with a different search parameter) tasks. Is this correct?

##### ..

# 

It looks like this is a great way to considerably speed up the process, thank you. I will look into pagination as I am not currently using it, as well as implementing it in Java. I’ll update this thread if I have any more questions or just to let you know how it goes.

---

<div class="post-metadata">

**Author:** ![Frederic\_Malenfant](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/frederic_malenfant/32/8358_2.png) [@Frederic\_Malenfant](https://forum.asana.com/u/Frederic_Malenfant)\
**Post date:** [31 July 2020 18:24 UTC](https://forum.asana.com/t/user-task-lists/89985/8 "2020-07-31T18:24:29Z")

</div>

I talked to them about paging in another thread, and the conclusion is that if you sort by “modified\_at”, the results may be invalid because the modified\_at date used is not the one from the task but the one of their index.  
But, if you use “created\_at” instead, it should be ok.

But, I did not try paging lots of data using that endpoint, we only use it to get the first 100 items for some very specific needs.

---

<div class="post-metadata">

**Author:** ![Ani\_Aggarwal](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ani_aggarwal/32/59112_2.png) [@Ani\_Aggarwal](https://forum.asana.com/u/Ani_Aggarwal)\
**Post date:** [31 July 2020 18:41 UTC](https://forum.asana.com/t/user-task-lists/89985/9 "2020-07-31T18:41:13Z")

</div>

> [@Frederic\_Malenfant](#):
>
> if you sort by “modified\_at”, the results may be invalid

What about tasks that were deleted or modified from the last date? I assume those wouldn’t show up under the “created\_at” endpoint, but do correct me if I am mistaken. If they do not show, is there a workaround for getting the recently modifed/deleted tasks?

---

<div class="post-metadata">

**Author:** ![Frederic\_Malenfant](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/frederic_malenfant/32/8358_2.png) [@Frederic\_Malenfant](https://forum.asana.com/u/Frederic_Malenfant)\
**Post date:** [31 July 2020 18:46 UTC](https://forum.asana.com/t/user-task-lists/89985/10 "2020-07-31T18:46:07Z")

</div>

The first time you retrieve all, use “created\_at”.

After, use “modified\_at” to only query the last ones. But just remove a few hours to your query to make sure you have them all.

Also, if you use that method, you will never be notified of deleted tasks. You may need to re-query all from time to time I suppose.

---

<div class="post-metadata">

**Author:** ![Ani\_Aggarwal](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ani_aggarwal/32/59112_2.png) [@Ani\_Aggarwal](https://forum.asana.com/u/Ani_Aggarwal)\
**Post date:** [31 July 2020 19:23 UTC](https://forum.asana.com/t/user-task-lists/89985/11 "2020-07-31T19:23:50Z")

</div>

Ok great! Thanks for all the info.

---

<div class="post-metadata">

**Author:** ![User1](https://luna1.co/8d76cd.png) [@User1](https://forum.asana.com/u/User1)\
**Post date:** [25 August 2020 03:57 UTC](https://forum.asana.com/t/user-task-lists/89985/12 "2020-08-25T03:57:00Z")

</div>

Hi Frederic,  
The “search” end point works great. But it doesn’t work when we call it using a service account in an Asana Enterprise account. It seems the service account is not considered a premium user. Is there a way to solve this? Our goal is to enumerate all tasks in a project and we are doing it exactly as you suggested (using the created\_at.before filter).  
Thanks,  
Arvind

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 18:57 UTC](https://forum.asana.com/t/user-task-lists/89985/13 "2025-05-30T18:57:13Z")

</div>

Closed on 30 May 2025 18:57 UTC


