Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Power BI can't parse a JSON response from SonarQube API

Hello everybody,

 

I have a curious problem when querying the SonarQube API using the Web Get Data option. SonarQube is a tool used for continuous inspection of code quality. It contains various metrics related to code inspection. Let's get to the matter at hand.

 

I've three calls to the API looking similarly to this:

  • https://<on-prem-server>/sonarqube/api/measures/component?metricKeys=ncloc,complexity,violations,blocker_violations,bugs&component=<project_id> --> this returns a json in the browser, but Power BI returns access prohibited even though I am an admin in SonarQube
  • https://<on-prem-server>/sonarqube/api/components/search?qualifiers=TRK,SVW,APP --> this returns a json in the browser, and Power BI successfully parses this response allowing for further data processing
  • https://<on-prem-server>/sonarqube/api/issues/search?componentKeys=<project_id> --> this returns a json in the browser, but Power BI is unable to parse the response, and only parses the top level, but the subsequent list is empty (see images)
 
 

 

                                                             Top level parsed

Top level parsedTop level parsed

                                                                  issues list is empty

Issues list is emptyIssues list is empty

 

Other remarks: 

 

  • I am an admin in SonarQube in the company (and the credentials seem to be fine)
  • Downloading the JSON response of the second query from web browser and manually importing it in Power BI works just fine

 

Does anybody know what the problem could be?

Thanks for any help!

 

With best regards,

Denis

 

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi  @Anonymous 

What is your M code in your power query, I think you need "Json.Document" to parse it.

Here is a blog, you could refer to it:

https://www.thebiccountant.com/2017/08/30/how-to-open-a-complex-json-record-in-power-bi-and-power-query/

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

hi @v-lili6-msft ,

 

my M query looks like this after trying the solution. (Json.Document was part of the original query - the original looked the same as the one below if we omit the second line in the let block )

 
 
 
Anonymous
Not applicable

I am sorry, the image didn't go through.

 

M queryM query

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors