Forum Discussion
Can't Refresh without Gateway with Web API Source (new issue)
Hi all,
having read (nearly) all posts and solutions for similar issues, I cannot figure out why this isn't working. I have a published PowerBI report which is refreshing automatically without the use of a gateway. Now I have added an additional Web API source and after publishing, a gateway is required all of a sudden to realize the automated daily refresh. For me it is not clear why this is, on the desktop version it refreshes without any problem and I'm running other published Web API's without a problem. This one should be an open and available feed and I've embedded the 'Get Contents' construction to prevent issues around that.
To give the details, it is around this data source call (M-code), holding the API-url which also works directly in a browser:
= Json.Document(Web.Contents("http://161.35.43.125:8080/metrics/instagram/dates/2020-08-01/2020-08-02"))
Anyone able to replicate the issue and/or identify the cause? Would greatly be appreciated!
Krgds,
Bart
PS: I'll copy in some members who gave meaningfull comments on this topic before:
Hi all, I received word from Microsoft (Power BI) Support with more information. I thought it was valuable to share it with you::
We have got an update from our Product Engineering team:
As we see that the User is using https and http urls to build the report. We checked with our SME they confirmed that, Power BI Service requires https urls for Web data sources to refresh. For non-secured urls (http), it's required to go through the gateway. By design.
So an anonymous API feed using "http" will not allow for a scheduled refresh in the online Power BI service without a gateway. It needs to be an https one.
Krgds,
Bart
11 Replies
- BartdTFrequent Visitor
Hi all, I received word from Microsoft (Power BI) Support with more information. I thought it was valuable to share it with you::
We have got an update from our Product Engineering team:
As we see that the User is using https and http urls to build the report. We checked with our SME they confirmed that, Power BI Service requires https urls for Web data sources to refresh. For non-secured urls (http), it's required to go through the gateway. By design.
So an anonymous API feed using "http" will not allow for a scheduled refresh in the online Power BI service without a gateway. It needs to be an https one.
Krgds,
Bart
- BartdTFrequent Visitor
Hi all, after updating the API making it an anonymous https-call iso an http-call the online automatic refresh is allowed again. So this solves the issue.
Krgds,
Bart
- adnanarainHelper V
I am using simple static web address with https but still i cant refresh my data without gateway. Can you please help me in this i am using below M code:
let
Source = Web.BrowserContents("https://gist.github.com/tadast/8827699"),
#"Extracted Table From Html" = Html.Table(Source, {{"Column1", "TABLE.js-csv-data.csv-data.js-file-line-container > * > TR > :nth-child(1)"}, {"Column2", "TABLE.js-csv-data.csv-data.js-file-line-container > * > TR > :nth-child(2)"}, {"Column3", "TABLE.js-csv-data.csv-data.js-file-line-container > * > TR > :nth-child(3)"}, {"Column4", "TABLE.js-csv-data.csv-data.js-file-line-container > * > TR > :nth-child(4)"}, {"Column5", "TABLE.js-csv-data.csv-data.js-file-line-container > * > TR > :nth-child(5)"}, {"Column6", "TABLE.js-csv-data.csv-data.js-file-line-container > * > TR > :nth-child(6)"}, {"Column7", "TABLE.js-csv-data.csv-data.js-file-line-container > * > TR > :nth-child(7)"}}, [RowSelector="TABLE.js-csv-data.csv-data.js-file-line-container > * > TR"]),
#"Promoted Headers" = Table.PromoteHeaders(#"Extracted Table From Html", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"", type text}, {"Country", type text}, {"Alpha-2 code", type text}, {"Alpha-3 code", type text}, {"Numeric code", Int64.Type}, {"Latitude (average)", type number}, {"Longitude (average)", type number}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{""})
in
#"Removed Columns"- AnonymousNot applicable
Hey,
try using this Code instead:
Source = Web.Contents("https://gist.github.com/tadast/8827699"),
- GilbertQSuper UserHi there
When I click on the link it does not work.
What happens when you do this in PBI Desktop? Does it work.- BartdTFrequent Visitor
Thanks for the check. Yes, in Desktop ik works perfectly. I see that the link also picks up the last two brackets and quotes of the M-code, which do not belong to the URL. Please use this 'pure' link for the check (M code as a whole works incl the brackets/quotes):
http://161.35.43.125:8080/metrics/instagram/dates/2020-08-01/2020-08-02
Krgds,
Bart
- BartdTFrequent Visitor