Get all Tasks(Tasks,SubTasks, Sub-SubTasks) together

How to get all tasks(Tasks,SubTasks, Sub-SubTasks) in a single result by using Asana API or asana.js.

Last time I checked it was not possible, and it is very annoying indeed… @Matt_Bramlage can you confirm please?

Thanks for your reply,
Still its not possible, Please check and let us know.

@Avi and @Bastien_Siebman, it actually is possible, but I have to lead off with a “we discourage it” for a pretty good reason - it’s possible to cause an Asana API stability issue with this. It makes for a somewhat dangerous situation, especially if you’re building an integration for many users, because the amount of data that comes back depends on the structure of the subtasks. Your integration might be fine, then bam, a pathological case that causes us to ban your app for that user :frowning:

I’ve started some dialogues with the API team about whether we can mitigate this to some degree, but in the future, the mitigation will probably look quite different than what we allow at present - it will probably be either something meant to traverse nested graphs like or we just remove the method by which you can do this today, or both, so how to do it right now is likely to change in the future.

That being said, it can be pretty handy if you absolutely know that you’ll never ask for a pathological subtask tree, so rather than go through how it can be done here (in case others stumble on this without reading the caveats above ^ ) I’ll DM you with how to do it.



I would also like to know how to get all subtasks of a task under a particular Project using the API. I’m trying to set something up for this using Klipfolio and I don’t want to have to go and create multiple datasources one for each task with a particular ID.

Hello, I’ve just come across this post from a couple months ago and was wondering what your ‘how to do it’ was. I’ll I’m doing is getting all tasks and subtasks to analyze in a BI platform, and retrieving all tasks and subtasks right now for our 181 projects is a little cumbersome. We’re only authenticating as one user and no other users are going through our app, so you’re issues you brought up don’t apply to us.


@Matt_Bramlage what would be nice is the ability to know if there are sub tasks under a task? (e.g. a has_subtasks true/false) then we can know if we need to take the initial expense if syncing them… Then after the initial sync we are using webhooks (or trying to), however that opens up the other side of the issue for us, how do know what project(s) that sub task is under. Which If found out today is far more complicated that it should be IMHO… As a sub task can have projects assigned directly to it, and the parent, parent,… task can have different projects assigned to it.


Is this still not an option?

I need this for a Klipfolio integration.

Hi @Tony_Monita,

Yes, unfortunately this is still not available. Our API team has been chatting about what sorts of possibility there is to find a middle road here where we don’t have a feature that’s all but guaranteed to get your app shut down for particular users, but still provides enough context to allow you to know when you might need to make more requests.

A basic version of this might be something like @Edward_Rudd suggested and have some signal that there even are any subtasks to be fetched, which means you don’t have to make a second request for every task on the off chance that it might have subtasks. We might be able to do even a bit more and give you the count of subtasks or an array of IDs, but we’re not sure just yet what this is going to look like. We’re working on it though!

1 Like

It looks like there is still no way to determine if a task has subtasks, short of calling tasks/TASKID/subtasks on every single task. When will a subtask count or something similar be implemented in a task’s properties?

For people stumbling on here: It is now possible to get a list of subtasks:

I feel like this problem still hasn’t been resolved for business tier companies, as only enterprise has access to organization export and to a findAll API method for tasks. This makes tasks with no projects invisible for API fetching.

Could you give me any pointers as to how to solve that problem, @Matt_Bramlage ?

Can you point to where in the documentation you’re seeing this? I’m not familiar with any enterprise-specific findAll API method.

I checked the Java API library I’m using and it is attempting to request ‘/tasks’ GET with no parameters.
Sorry for introducing that confusion.

The closest thing I would name would be the search tasks in workspace method.

1 Like