Retrieving multiple tasks using a list of task IDs

Hi everyone,

I have a question about the option to retrieve multiple tasks in node.js based on a list of task ids.

Currently I have a list of task ids in a database, which I’d like to use to keep track of each task status and update it in the client on a scheduled basis.

What I’m trying to understand is if I can actually utilize the Asana API to get a collection of specific tasks by providing a list of task ids(that are not necessarily connected to one single project) so I can then update the relevant data in the client.

Any help would be appreciated.

Thanks!

I don’t see any way to pass a list of ids to the search api…

I think that your best option is to use the “batch api”, you’ll be able to query up to 10 tasks at a time on every query. That’s what we do when we need to query lots of independent tasks individually.

But watch out for your api limitation, as each batch batch of 10 is count as 10 query within the allowed 60 seconds.

Because these queries can be very long to execute, may I suggest to keep a cached copy of the tasks, and use the “search api” to query for last modified tasks, and then only query the modified ones since your last execution.

3 Likes

Thanks! That did the trick :slight_smile:

2 Likes