About Events endpoint + Paging

Hi everyone. We try to make our app faster by using several kind of caching for tasks, stories, projects, subtasks…

One solution we plan to use is keep a list of tasks in a project, then only request “events” on that project, by using the events + sync method.

I tried it, and register my sync token, then update several tasks, and I got 120 events. So I see that there’s no pagination on events endpoint. The “limit” parameter is ignored.

Is it possible that I request an event token 10 hours later, and get 10000 items in return without paging, and wait several minutes to get the response or get a timeout?

If so, is it a best practice to contantly update all my pending sync tokens?

use case: it’s an app that can query lot of data from 1 or more projects to generate charts / reports / export, and all the code/cache is on client-side browser using indexDB.

If I wait for several hours before fetching events, I’m afraid that tons of events may have occur.

So, do I need to update these events+sync token every X minutes, even if I don’t need them immediately?

Using server-side webhook is not an option for now, as we don’t want to keep asana customer data in our bridge24 servers. That’s why we use browser indexDB caching.

Hello @Frederic_Malenfant ,

This is a great question. From what I can gather, it looks like you are correct. There is currently no paging and you would either get a huge amount of data or a timed out response.

There’s not really a one size fits all solution for using events like this. It depends how big the project is and how active it is. Constantly updating the token seems like a workaround, but not a solution.

I not sure if this is what you need, but I would think using the Search API and filtering by modified date would work best for something like this (and doing client side pagination using the modified dates).


1 Like

Thank you for these informations.
We would like to use the search api, but we have users from free and premium asana accounts, some of them doesn’t have access to the search API…
But if we can’t find a better solution, we may decide to eventually allow access to our app only for premium asana users.

For now, we’ll try to find the optimal refresh delay, maybe a variable one based on number of tasks on project or activity on the last request… more active project can get a smaller delay.

1 Like