Forum Discussion
Anonymous
6 years agoNot applicable
Web.Contents - Desktop to Service
Hello Everyone, I have been working on this for awhile, but I am just lacking a proper understanding of how Web.Contents is used between the Desktop and Service. Here is my delima: I have Po...
- 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/
ImkeF
6 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/
Anonymous
6 years agoNot applicable
ImkeF - I just had to take a fresh look, once we the Static Url was set, it worked like a charm. Here is the code snippet:
Pagination = List.Buffer(List.Generate( () => [WebCall=[], Page = 1, Counter = 0],
each (try List.IsEmpty([WebCall][active_models])=false otherwise false or [Counter]=0) and [Page]<=100,
each [ WebCall = Json.Document(Web.Contents("https://api.getdata.com",
[RelativePath="surveys/clientid/responses/?per_page=100&page=" & Text.From([Page]),
Headers=[Authorization="Bearer XXXXXXXXX"]])),
Page = [Page]+1,
Counter = [Counter]+1
Set the datasource "https://api.getdata.com" to Anonymous and then skip connection when it is the service.