API Pagination and the 'nextpage' Token
Get a full list of tasks using these calls:
- [GET] /tasks search all tasks in the account
- [GET] /spaces/{spaceId}/tasks search tasks in specific Space
- [GET] /folders/{folderId}/tasks search tasks in specific Folder
Please note, there is a limit to the number of tasks which can be displayed in response to these queries.
- Use the call GET /tasks. Add the parameter pageSize=1000. You can also include any additional parameters you would like to add.
- ‘responseSize’ and ‘nextPageToken’ parameters are shown in response. ‘responseSize’ indicates the total amount of tasks (hidden and shown).
- Copy the ‘nextPageToken’ parameter’s value.
- 4. Use the call GET /tasks with the nextPageToken=<value> parameter. If you included additional parameters on Step 1, you will need to include those here as well.
Continue switching pages with the same token, the API stops passing the ‘nextPageToken’ when you hit the end of the list.
You can use the ‘pageSize’ parameter to adjust the response size for your /tasks calls and apply it together with ’sortField’ to be able to sort responses based on certain criteria. Please note, in this case it is not possible to have more than 1000 results.
HI Roberto VALENTE DA SILVA, this is awesome, I cant thank you enough 😉.
Why isn't this documented under the API reference? https://developers.wrike.com/api/v4/tasks/
Why is nextPageToken listed as required? (It's not, it's just that you get only the first items)
Why is nextPageToken not listed in the response of the reference?
Hi Proj L - David G! We've passed your feedback to the relevant team, thank you for sharing your thoughts on our documentation!
Lisa Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover
Lisa Wrike Team member Become a Wrike expert with Wrike Discover