Sonar Qube :Getting issues from specific branch through API call

Sonarqube DeveloperEdition version 8.9.1

Im trying to fetch issues with respect to Specific branch . But it always giving me the issue count from the Master branch.

Below is the API:
[https://sonarqubeserver.com/api/issues/search?resolved=false&types=BUG&branch=SonarQube_Analysis_5.10.0.2]

Tried Options posted in the Sonar community but nothing seems to be working out for me.

Any help is much appreciated. Thanks

Hi @rishad-mj,

A branch is always associated with a project, so you should expect to add a componentKeys parameter to your search to specify which project you’re interested in. So you’ll end up with something like:

https://sonarqubeserver.com/api/issues/search?componentKeys=myprojeckeyt&resolved=false&types=BUG&branch=SonarQube_Analysis_5.10.0.2

Can you try this and let me know how you go?

Regards,

Cameron.

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