Branch filter in API api/issues/search

  • Version 7.7
  • Get branch related issues from api/issues/search
  • Cannot find this in documentation

Hello
I’m gathering info on issues using api/issues/search API .
I can use parameters like projectKeys, statuses, severities to further filter the results but I cannot find a branch/branches filter. The API always seems to respond with the top most branch / probably master.

Please help if you can let me know how to add the branch filter in my API call

https://sonarqube.server/api/issues/search?projectKeys=$project&statuses=OPEN&severities=CRITICAL,BLOCKER&facets=authors

Seems I wasnt careful enough because “&branch” works .
“&branches” doesnt seem like it

I’ll leave this up if anyone was looking for similar info
:wink:

1 Like

Hi, Im also 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 I’m using to fetch the issues:
https://sonarqubeserver.com/api/issues/search?resolved=false&types=BUG&branch=SonarQube_Analysis_5.10.0.2

Im using Sonarqube DeveloperEdition version 8.9.1