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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
gav12345
Frequent Visitor

Power BI desktop - REST API refresh times out

Hi,

I'm connecting to a REST API to bring several tables into a Power BI file. I can connect to the API and retrieve the data without any issues using 'Get Data > Other > Web' from the main toolbar, and then entering a URL in the format:

https://api01.naturalhr.net/2.0/timeoff/key/(security key here)/format/xml

The data usually comes back quite quickly - within about 10-20 seconds.

 

My issue is that when I try to refresh the same data it usually times out after 5-ish minutes. To refresh I go to 'Transform Data (I think this was 'Edit Queries' in earlier versions) > Select the query I'm interested in (in this case 'timeoff') > Select the 'Refresh Preview' button on the main menu. Note that I do have some transformations to the original data, but even when I remove all of these I am still seeing the time-out.

 

I'm spent some time trying to troubleshoot this with some help from some guys over at StackOverflow, and what I've found is that (using the new-ish Power BI diagnostic tools) while the Resource column displays the original URL, the Data Source Query column appends the text 'HTTP/1.1' to the original URL (i.e. https://api01.naturalhr.net/2.0/timeoff/key/(security key here)/format/xml HTTP/1.1 ).  If I try to establish a new connection with the 'HTTP/1.1' text added to the URL string, the query times out. Screenshot below.

 

Capture2.PNG

 

Can anyone tell me why the extra text is added by Power BI, why this might be preventing the data being returned, and how I can work around this? Thanks.

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @gav12345 ,

 

You could see the diagnotics schema about "Data Source Query" here

The Data Source Query column allows you to see the query or HTTP request/response sent against the back-end data source. As you author your Query in the Editor, many Data Source Queries will be emitted. Some of these are the actual final Data Source Query to render the preview, but others may be for Data Profiling, Filter dropdowns, information on joins, retrieving metadata for schemas, and any number of other small queries.

I tested with a simple URL, it returned "GET" and "HTTP/1.1" too. 

2-1.PNG

So you could add a "timeout" parameter in Web.Contents() function. Here is a similar case for your reference.

https://community.powerbi.com/t5/Desktop/Query-Timeout-on-update/td-p/53459

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @gav12345 ,

 

You could see the diagnotics schema about "Data Source Query" here

The Data Source Query column allows you to see the query or HTTP request/response sent against the back-end data source. As you author your Query in the Editor, many Data Source Queries will be emitted. Some of these are the actual final Data Source Query to render the preview, but others may be for Data Profiling, Filter dropdowns, information on joins, retrieving metadata for schemas, and any number of other small queries.

I tested with a simple URL, it returned "GET" and "HTTP/1.1" too. 

2-1.PNG

So you could add a "timeout" parameter in Web.Contents() function. Here is a similar case for your reference.

https://community.powerbi.com/t5/Desktop/Query-Timeout-on-update/td-p/53459

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

I'm having one or two issues replying to this. In summary, adding the timeout seems to have resolved this for now - many thanks for your help.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors