Forum Discussion
'Dynamic data source' error for Planned Refresh on semantic model
You are still using a dynamic value for the first parameter of web.contents. You need to look at using the option properties of web.contents. Please see https://learn.microsoft.com/en-us/powerquery-m/web-contents and the above referenced article.
I'm trying so hard but I'm getting nowhere.
On the 'web-contents' page of your link, I think example 3 applies. But the example doesn't have a field for the api key value... then how should this work? Makes me question this approach.
I asked ChatGPT to solve the issue but it keeps making the url in web.content a dynamic value instead of the base url.
Despite those 2 problems I tried it myself. Didn't work so far.
AllData = List.Transform(PagesToFetch, (page) =>
let
Response = Json.Document(
Web.Contents(
"https://api.onview.nl",
[ApiKeyName = "/api",
ApiKeyValue = "10dc841a-0745-...-6207f1dba36a",
RelativePath = "/dossier"],
"?offset=" & Text.From(page[Offset]) &
"&limit=" & Text.From(PageSize),
[Headers=[#"Content-Type"="application/json"]]
)
)
Errors with too many arguments in this function (expecting 1 or 2). I tried different numbers of brackets or removing ApiKeyValue which doesn't even exist as a function(?) but getting nowhere.
Any help would be appreciated!