Forum Discussion
Unsupported Refresh on Web.Contents
- Anonymous6 years ago
I was able to import and also get the Gateway refresh to work now. I had to split it up this way:
= Json.Document(
Web.Contents("https://name.com:port",
[
RelativePath="/api/viewContents/projects/v1/PowerBiProjects?projectId=-1"
])
)
Hi, We might help you more if you show us the error and specify the api authentication. Here is the good practise for this:
Web.Contents(
"https://name.name.com:1111/api",
[
RelativePath="viewContents/projects/v1/PowerBiAllProjects",
Query=[projectId=-1]
]
)
I hope this works.
Regards,
- Anonymous6 years agoNot applicable
That would not connect following your example. My error is this:
You can't schedule refresh for this dataset because the following data sources currently don't support refresh:- Data source for IssuesProjectsJoined
Query contains unsupported function. Function name: Web.Contents
Here is the data source for this from advanced editor:
Source = Json.Document(Web.Contents("https://name:port/api" & "/viewContents/projects/v1/PowerBiProjects?" & "projectId=-1")), viewContentsV1 = Source[viewContentsV1], rows = viewContentsV1[rows],- lbendlin6 years agoSuper User
That data source is not well formatted. Refer to the example provided by ibarrau
It may also help not to conflate the web request and the JSON parser.
Try having the source as just the web contents.
Source = Web.Contents(URL,Parameters), JS = Json.Document(Source), viewContentsV1 = JS[viewContentsV1], rows = viewContentsV1[rows],- Anonymous6 years agoNot applicable
His format would not work - my import fails.