Forum Discussion
Make API calls based on last id from previous call
Hello! Need help with API calls. Is it possible to make api calls based on last id field returned from previous call? For example:
Fitst Call returns 250 records (max limit). Checking rule if there 250 or more records returned, then expand id field, grab the last one and make next call with parameter since_id=last id from previous call (this parameter allowed in Shopify source), else do nothing.
Then checking again count of returned records for second call and apply the same rule for it. So, if there're >=250, then grab last id and do a new call. Iterate until call returns <250 records. Then combine all returned data into one table.
1 Reply
- negi007
Community Champion
here are some sources which can direct you in right direction
(73) Accessing API and web service data using Power Query - by Chris Webb - YouTube
https://community.powerbi.com/t5/Power-Query/Pull-data-from-a-REST-API-Authentication/td-p/246006
https://growteq.nl/2017/01/11/self-service-data-ophalen-vanuit-exact-online-in-power-bi/