Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello all,
I need some help with looping for paginated API call.
My scenario is that I need to make two calls to rest api. First call to be made with some parameters, which will fetch a scrollid and first set of records. Following which a subsequent call to be made/looped until there is no data is returned, meaning the total number pages in the subsequent call is unknown.
Details/steps are as follows:
1) Call the initial/base url once; with some parameters which will fetch a scrollId and first set of dataset.
2) Subsequent calls to be made using same url by providing the only the scrollid as the parameter which is taken from the base url. This call has to be looped until this api call fetches no data.
Rest Endpoint Url details:
a) Base url : http://server:9950/ExcpnReport?context=ab-20210511-40433&book=abcd&pagesize=25
b) subsequent url : http://server:9950/ExcpnReport?context=ab-20210511-40433&scrollid=AbcdefghIjkl
Sample Json output from base url (FIRST CALL):
{"ScrollId": "AbcdefghIjkl", "Exceptions":[{TradeId:"ab1cd","expected":0,"unexpected":50......}]}
Sample Json output from subsequent url:
{"ScrollId": "AbcdefghIjkl", "Exceptions":[{TradeId:"XYZ","expected":10,"unexpected":15......}]}
Any help will be much appreciated or even tips to point me in the right direction would be amazing.
Thanks in advance.
Solved! Go to Solution.
Hi @bajesh007
This is the same question as this ?
List.Generate function condition not met - REST AP... - Microsoft Power BI Community
See my response there and close this one if you can.
Regards
Phil
Proud to be a Super User!
Hi @bajesh007
This is the same question as this ?
List.Generate function condition not met - REST AP... - Microsoft Power BI Community
See my response there and close this one if you can.
Regards
Phil
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 6 | |
| 5 |