Hey friends,
I was wondering if anyone has any experience with using the events api on a specific project’s tasks? What we’re looking for are the following:
- Changes in custom field {sprint_number}.
- The purpose is to time stamp and track any instance a task spans multiple sprints
- Comments on tasks
- Anecdotal tracking of ‘why’ a task moved back into a backlog / into another sprint
- Task Changing Sections
It appeared that something along these lines could be completed with the Asana Events API, but when I run the events api on a project ID the script runs but returns no values.
I’m curious if anyone else has done any similar builds.
Thanks!
Taylor
Hi @Taylor_Pennell!
Did you make sure to pass a proper sync token to the EventsApi.get_events() method?
This method does silently return empty event collection when the sync token is missing.
There’s a clever workaround @John_Vu arranged through pagination disabling that I’ve been using to overcome this.
Essentially it’s idea is to catch the 422 error, extract and persist the sync token from the response and then re-call the EventsApi.get_events() method again to get the events fired since the sync token was issued.
Hope this helps 
2 Likes
Hi Mikhail,
thank you for the reply ! I’ve currently been omitting the sync token. I’ll look into this work around and see if I can get it to work.
Thanks a bunch!
Taylor