Web API in SonarQube 8.4 to get detailed report of the security hotspots

I’m using the following api to get the detailed issue report for my project in SonarQube 8.4,

http://localhost:9000/api/issues/search?componentKeys=Project&ps=500

but on passing the parameter of ‘sonarsourceSecurity’ I am not getting any details of security hotspots which occurred in my project. Please guide me if I’m using the correct API or there is a different API to get the values of security hotspots such as its category, review priority which i am able to view in the user interface.

Hi @shivankar ,

welcome to the community :wave:

there is an internal API endpoint, that might be the one that you are looking for?

http://localhost:9000/api/hotspots/search?projectKey=Project&p=1&ps=500&status=TO_REVIEW&onlyMine=false&sinceLeakPeriod=false

you can view the documentation about this api endpoint if you enable the option “Show Internal API” in http://localhost:9000/web_api/

hope that helps

2 Likes

Hi @Tobias,

Worked like a charm .
Thank You so much!!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.