dipudan
(Dipu Krishnan)
June 26, 2024, 11:17am
1
Hello,
I am using sonarcloud (version 10.4) and trying to fetch Maintainability Rating using the fetch endpoint
https://sonarcloud.io/api/measures/component?component=**&metricKeys=sqale_rating
which gives me an output
{
“metric”: “sqale_rating”,
“value”: “1.0”,
“bestValue”: true
}
In documentation it says " The default maintainability rating grid is: A=0-0.05 , B=0.06-0.1 , C=0.11-0.20 , D=0.21-0.5 , E=0.51-1"
As per this in UI dashboard I should see E but I see A for Maintainability Rating on New Code .
How can I get the actual data i.e. if the score is A, B or C…
ganncamp
(G Ann Campbell)
June 27, 2024, 11:51am
2
Hi,
Welcome to the community!
This is the actual data. You’re seeing it the way it’s stored, before it’s interpreted to a letter grade by the front-end code.
HTH,
Ann
hendra1
(hen1)
December 9, 2024, 4:04pm
3
how to interpret the value then?
ganncamp
(G Ann Campbell)
December 9, 2024, 4:17pm
4
Hi,
Through the UI?
To be honest, I don’t remember which way the scale goes, whether 1 is E or A. But it should be easy to get yourself oriented by comparing the data coming back from the raw API with what’s showing up in the UI at the moment.
HTH,
Ann
1 Like
hendra1
(hen1)
January 3, 2025, 6:21am
5
After further inspection, the value is the position of the rating.
1 => A
2 => B
3 => C
4 => D
5 => E
1 Like