I can't get pagination to work with Asana
stadler72 opened this issue · comments
I'm using ImportJSON to get task data from Asana. Basically, I want all tasks to import into my sheet so I can do a pivot table from there. Until I do that, the results will be limited to the 100-results limit. So I need to add the call for the second set.
How I think it should work: Asana gives me my first 100 results and then gives me an "offset" variable value I would then plug in and get my second page of data.
The problem is that I don't see that offset value Asana claims to be returning.
And because the documentation specifies that no offset value will be returned if all of the records fit within the 100-record limit, I constrained the initial call to 20 (since I know I have at least 100) to see if that was the problem. But even with 20, I don't see the offset from Asana.
I'm wondering if I'm doing it wrong.
Documentation from Asana is here: https://developers.asana.com/docs/pagination
API call I'm using:
=importjson("https://app.asana.com/api/1.0/workspaces/171848739495/tasks/search?access_token={access_token}&assignee.any={assignee gid}&due_on.before=2021-05-05&completed=false&opt_fields=due_on,assignee.name&limit=20")
Just figured it out. Pagination isn't supported with task/search.