Exporting all modified tasks efficiently

¿How to extract all tasks modified after a date efficiently?

After digging around a bit, the only way I found to get all recently updated tasks is to first query all projects in a workspace, to then iterate over the result to query all recently updated tasks for each project. This makes the code take about an hour start to finish.

I’ve also tried the search tasks in workspace endpoint, but it only returns 50 tasks.

¿Is there a more efficient way to do this?

I think this is the most efficient method. If you set the limit query parameter to 100 you should be able to get back 100 tasks at a time - that’s the maximum. Read the “Pagination” section in the API docs for how to deal with more than 100 tasks.

Are you aware of any issues with the search task API? I tried a request with limit 100 and got back 100 records and there was not pagination information in the API response. I then tried the same request but changed the limit to 20. Got back 20 records but no pagination info either. I also tried using the Java client library and got back only 50 records.

API in question: https://app.asana.com/api/1.0/workspaces/{workspaceId}/tasks/search

Hi @Anita_Jong and welcome to the forum,

There is no pagination for the Search API like there is for other endpoints; please read the section I referenced above in the API docs for more details.

Also, here is a good thread to read on the same subject:

Hi @Phil_Seeman,

Thanks for the response. Though it isn’t exactly what I’m looking for. Say there have been more than a hundred updates since a particular date, is there a way to easily extract them?

Take a look at the pseudocode here for how to handle things:

1 Like