Forum Discussion
VSTS odata refresh issue
Hi,
Some more information :
PowerBI has a limitation where it will not allow user to modify the URL due to the way security scopes work.
The following two articles go into detail of why this happens and how to work around it using query parameters and RelativePath parameter - which VSTS.AccountContents also allows you to pass.
https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-in-power-query-and-power-bi-m-code/
and
https://blog.crossjoin.co.uk/2016/08/23/web-contents-m-functions-and-dataset-refresh-errors-in-power-bi/
Thank you for the assistance arsaveli. I posted this as a bug here, and got the response you just passed on. However, there
are still multiple problems to solve. First, the blog post does not show anything about VSTS.Feed. Using the code below as a
starting point for a function should work. However, VSTS.Feed ignores the parameters. I've tried it with multiple projects and
I either get too many results (the initial problem), or for smaller projects, I get every field instead of just the ones selected.
let
BaseURL = "https://server.analytics.visualstudio.com/DefaultCollection/project/_odata/WorkItemSnapshot",
Select = "DateSK,WorkItemId,State,WorkItemType",
Filter = "WorkItemType eq Bug and State ne Closed and State ne Removed and DateSK ge 20180517 and DateSK le 20180615",
Source = VSTS.Feed(BaseURL, [Query=[select=#"Select",filter=#"Filter"]])
in
Source The second problem is that none of these parameters to VSTS.Feed() are documented. There are no examples. This has even
been requested by ericleigh007 in this post over a year ago. The same is true for OData.Feed().
Overall, without working examples of VSTS.Feed and VSTS.AccountContents that can actually refresh, the basic problem
still remains.