Forum Discussion
Web.Contents - Desktop to Service
- 6 years ago
Hi Anonymous ,
problem is the dynamic URL.
You have to use the relative path for it instead: http://blog.datainspirations.com/2018/02/17/dynamic-web-contents-and-power-bi-refresh-errors/
based on this post
https://community.powerbi.com/t5/Power-Query/Exchange-rates-Data-not-refresh/m-p/909612
it seems that you need a gateway installed
- Anonymous6 years agoNot applicable
Stachu - Based on what the page you gave me, a gateway for web is "Required for .html, .xls, and Access Databases", but in my case, this is cloud based API, not something local. I have another Power M query which only requires one pass at the API and it can be scheduled in the Service without issue, so I am not sure it is the gateway is the answer.
- ImkeF6 years agoCommunity Champion
Hi Anonymous ,
problem is the dynamic URL.
You have to use the relative path for it instead: http://blog.datainspirations.com/2018/02/17/dynamic-web-contents-and-power-bi-refresh-errors/
- Anonymous6 years agoNot applicable
ImkeF - We started trying to give a static URL within the Web.Contents and add the Relative path, but we aren't getting an results. Here is what we changed:
let BearerToken= "Bearer XXXXXXXXXXXXXXXXX", PageLimit = 20, Pagination = List.Buffer(List.Generate( () => [WebCall=[], Page = 1, Counter = 0], each (try List.IsEmpty([WebCall][client_data])=false otherwise false or [Counter]=0) and [Page]<=PageLimit, each [ WebCall = Json.Document(Web.Contents("https://api.getdata.com/surveys/clientid", [RelativePath="/responses?page=" & Text.From([Page]), Query=[Headers=[Authorization=BearerToken]]])), Page = [Page]+1, Counter = [Counter]+1 ] )) in PaginationIs there something wrong with syntax of the Relative Path parameter?
w.