Forum Discussion
Anonymous
5 years agoNot applicable
sonarQube API dynamic data
Hi, I want to access Sonar data via the API with the following request : let
BaseUrl = "https://sonar.xxxx.xxx",
RelPath = "api/projects/search",
EntitiesPerPage = 500,
GetJson = ...
- Anonymous5 years ago
HI Anonymous,
I mean unpackage your custom functions, you can take a look at the following codes:
let BaseUrl = "https://sonar.xxx.xxx", RelPath = "api/projects/search", EntitiesPerPage = 500, Json = Web.Contents( BaseUrl, [ RelativePath = RelPath, Headers = [ #"Content-type" = "application/json" ] ] ), components = Json.Document(Json)[components], #"TableConvert" = Table.FromList( components, Splitter.SplitByNothing(), null, null, ExtraValues.Error ) in #"TableConvert"Regards,
Xiaoxin Sheng
Anonymous
5 years agoNot applicable
Hi Anonymous,
If you convert custom function steps to common query table steps, did this issue appears again? If it appears again, can you please share some more detailed info to help us clarify your scenario?
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Anonymous
5 years agoNot applicable
Hi,
I don't know if I understood your request correctly with "convert custom function steps to common query table steps", but I have transformed my request like this :
let
BaseUrl = "https://sonar.xxx.xxx",
RelPath = "api/projects/search",
EntitiesPerPage = 500,
GetJson = (Url) =>
let options = [RelativePath=RelPath, Headers =[#"Content-type"="application/json"]], // pour la Basic en Base64 : token + ":"
RawData = Web.Contents(Url, options),
Json = Json.Document(RawData)
in Json,
Url = BaseUrl,
Json = GetJson(Url),
components = Json[components],
#"TableConvert" = Table.FromList(components, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
#"TableConvert"
The problem is always the same with referesh.
I suspect the problem is with the SonarQube API. Has anyone used it in PowerBI before? Does the automatic refresh work?
Thanks
Yves