# Get severity amount

**URL:** <https://community.sonarsource.com/t/get-severity-amount/85876>\
**Category:** SonarQube Cloud\
**Created:** [March 14, 2023, 4:43pm UTC](https://community.sonarsource.com/t/get-severity-amount/85876 "2023-03-14T16:43:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joaquin\_Alonso\_Dinam](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joaquin_alonso_dinam/32/15935_2.png) [@Joaquin\_Alonso\_Dinam](https://community.sonarsource.com/u/Joaquin_Alonso_Dinam)\
**Post date:** [March 14, 2023, 4:43pm UTC](https://community.sonarsource.com/t/get-severity-amount/85876/1 "2023-03-14T16:43:24Z")

</div>

Hi every one, I need get the number of issues by severity using the API of SonarCloud (of the image) by branch

![severities](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/a/f/af086de150f25d3c9a14d5d240fa13b32d3d590f.jpeg)

I can get the amount type of issues (CodeSmell, Bug, Vulnerabilites) using: [https://sonarcloud.io/api/project\_branches/list?project=org-key\_projectName](https://sonarcloud.io/api/project_branches/list?project=org-key_projectName) and filter by branch with jq.

I only need the number of severities (like the image) and not the detail.

Is any way to get this info by the API Rest?

Thanks!

---

<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:** [March 15, 2023, 1:12pm UTC](https://community.sonarsource.com/t/get-severity-amount/85876/2 "2023-03-15T13:12:38Z")

</div>

Hi,

Have you tried this via the UI? 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;  
Ann

---

<div class="post-metadata">

**Author:** ![Joaquin\_Alonso\_Dinam](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joaquin_alonso_dinam/32/15935_2.png) [@Joaquin\_Alonso\_Dinam](https://community.sonarsource.com/u/Joaquin_Alonso_Dinam)\
**Post date:** [March 19, 2023, 3:01pm UTC](https://community.sonarsource.com/t/get-severity-amount/85876/3 "2023-03-19T15:01:22Z")

</div>

Thanks Ann,

I do something different, but I think is not the most optimal way (I get all the issues with the an API request but this endpoint return a lot of info and I need make a data treatment to get only the OPEN issues and get only severity).

Do you know if is any plan to get that info with an API endpoint or could be considerate?

Thanks again, and for your time!.

---

<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:** [March 20, 2023, 12:35pm UTC](https://community.sonarsource.com/t/get-severity-amount/85876/4 "2023-03-20T12:35:14Z")

</div>

Hi,

You can filter the UI to show only open issues and by severity. That call would be a good one to eavesdrop on.

&nbsp;  
😃  
Ann
