# What is the metric value for security ratings (measure) in SonarQube

**URL:** <https://community.sonarsource.com/t/what-is-the-metric-value-for-security-ratings-measure-in-sonarqube/79673>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube, community\
**Created:** [January 4, 2023, 10:13am UTC](https://community.sonarsource.com/t/what-is-the-metric-value-for-security-ratings-measure-in-sonarqube/79673 "2023-01-04T10:13:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinod\_Kumar1](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/vinod_kumar1/32/20006_2.png) [@Vinod\_Kumar1](https://community.sonarsource.com/u/Vinod_Kumar1)\
**Post date:** [January 4, 2023, 10:13am UTC](https://community.sonarsource.com/t/what-is-the-metric-value-for-security-ratings-measure-in-sonarqube/79673/1 "2023-01-04T10:13:46Z")

</div>

I’m using SonarQube community edition version 8.9.9 (hosted on AWS EC2). I have projects on GitLab repo and have configured its CI/CD pipeline to generate the code quality report using the web API calls by using python-sonarqube-api ([GitHub - shijl0925/python-sonarqube-api: Python wrapper for the SonarQube (Community Edition and Enterprise Edition) and SonarCloud API.](https://github.com/shijl0925/python-sonarqube-api)).  
Now, the problem is when I make call this POST method

```auto
get_component_with_specified_measures(component="my_project",
                                                                 branch="develop",
                                                                 fields="metrics,periods",
                                                                 metricKeys="code_smells,bugs,vulnerabilities")

```

(refer [api/measures — SonarQube Client with Python 1.3.5 documentation](https://python-sonarqube-api.readthedocs.io/en/latest/examples/measures.html)) , in response, I just get the metric (security\_ratings) as a float value like 1.0. Whereas, I was expecting the response like A, B, etc.

Q1) Do we have anything out of box method, where I can get the security ratings like A,B, etc instead of float values?  
Q2) If not then may I know if there any documentation link (as I did not find anything official) or can provide me the remaining float values for B,C, etc so that I can do mapping at my end.

Would really appreciate a resolution on this.

Cheers

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [January 5, 2023, 3:35pm UTC](https://community.sonarsource.com/t/what-is-the-metric-value-for-security-ratings-measure-in-sonarqube/79673/2 "2023-01-05T15:35:16Z")

</div>

Hi,

Welcome to the community!

I believe the UI is mapping the floats to letters. The best way to master the API is to perform the desired action via the UI and eavesdrop to see which calls the UI made to accomplish the action.

You may also find [this guide](https://community.sonarsource.com/t/how-to-reverse-engineer-the-sonar-web-api/66810) helpful.

&nbsp;  
HTH,  
Ann
