SONAR QUBE 8.4 Rest API - for COMPLEXITY

Hi ,

I’m using sonarQube 8.4 community edition.

I’m using Sonar web API to fetch data .

I’m trying to fetch one data “Complex Functions Lines of Code (%)” which is present under complexity page.

from webAPI i got a metric key only for “cognitive complexity” & “complexity”

Not finding appropriate key for “Complex Functions Lines of Code (%)” . please help. !!

Some help on this will be really helpful!!

Hi,

This community is peopled by folks like you who might drop by in their spare time to try to help others out. SonarSourcers also participate here, but it’s also an odd-hours proposition. I.e. responding in this community is no one’s primary responsibility. So it’s quite normal - particularly on a Sunday - that you don’t get an answer to your question within a few hours, or even a few days.

To find all the metric keys, use the api/metrics/search call. You probably want to set ps=500 to make sure you get all the metrics without having to deal with pagination. You’ll find details about this and the other web services using the “Web API” link in the page footer.

 
HTH,
Ann