Retrieve Commit Revision details for a Security Hotspot using Rest API

Hi, We are using SonarQube Enterprise Edition Version 9.7.1.

The ask is to retrieve Commit revision ID for a security hotspot through Rest API.

I could get committer email ID from hotspot API but how can I get the commit revision ID (I can see this in UI) ?

Grateful for any help.

Hi,

Welcome to the community!

Since you can see the value in the UI, that means there’s a web service that feeds that data, and you can use your browser’s dev tools to eavesdrop to see which calls the UI makes to get that data.

I suspect what you’re going to find is that the commit ID is attached to the line of the file, rather than to the Security Hotspot. So you’ll need to do something like Security Hotspot → line # → page data → line # → revision ID.

 
HTH,
Ann