Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Pascal1503
New Member

Scrolling POST REST API request - problems

Hello all,

 

I got a problem with my scrolling POST REST API request.

 

Description of what I want to do:

1. At the moment I´m doing a call against the first API where I get back an "ExportID".

2. With that "ExportID" I request the second APi called "ExportAPI".

3. Now I do a scrolling export (with a loop) against that second API that puts all data per request in one table - the amount of calls vary based on the request (input parameters) I do against the first API (e.g. 20 calls)

fyi:

Usual behaviour of the scrolling export when you do it for example over Postman: 
The call against the second (exportAPI) is always the same with the same "ExportID". But with every request you will get other data back. Therefore, the "ExportAPI" will know that for this specfic "ExportID" a request was made and will get you the second scroll.

 

Description of the problem:

I have no problems setting up the code or the loop (done with list.generate). I`m at the point where I get the expected results for the first scroll.

But now if I look at the second scroll, the data I´m getting back is exactly the same as in the first scroll.

I have the guess that PowerBI knows that I do the the same request with the same "ExportID" for each scroll and is caching the the first scroll and puts the results of the first scroll also in the sceond and third one and so one. 

Therefore, I get the same data for each scroll. 

 

Is there a way to bypass that cache? 

 

I already tried to create a own function for both requests that are called within every loop, but with the same result.

 

I´m trying now for a long time with no solution to that problem. 

 

Any suggestions? 

@amitchandak I saw you repsonded in quite a lot of forum posts regarding REST API calls maybe you can help here. 

 

Thank you in advance,

Pascal

 

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

To prevent the cache from playing with you you can add a random query parameter to each request

 

<url>?ExportID=123456&r=<current UTC timestamp>

 

That parameter will be ignored by the API but it throws the cache off.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

To prevent the cache from playing with you you can add a random query parameter to each request

 

<url>?ExportID=123456&r=<current UTC timestamp>

 

That parameter will be ignored by the API but it throws the cache off.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors