Forum Discussion
Anonymous
5 years agoNot applicable
REST Api pagination
Hello, I am wondering if you can help me with api pagination... I am trying to get all records from an external api but it restricts me with only getting maximum of 10. There are around 40k records....
lbendlin
Super User
5 years agoMost likely that site allows GET parameters or POST payloads specifying the page number, and a larger amount of results per page. Do they provide any type of API documentation?
- Anonymous5 years agoNot applicable
Thanks for you reply... They only allow page numbers in the "body" and the maximum is 10 records by default. dont allow to fetch more.
- lbendlin5 years ago
Super User
Fair enough.
1. Run the initial query and fetch the totalCount value
2. Generate a series of page numbers from 2 to TotalCount/10
3. add the page number to your content payload and fetch the individual results
4. combine with the result from page 1 (step 1)
- Anonymous5 years agoNot applicable
Thankyou lbendlin
But I have no clue how can i write your given 4 steps in the editor. I am very new to Power Query... 😐