cancel
Showing results for 
Search instead for 
Did you mean: 
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
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors