List the branches of a project. The statistics are the overall counts on long branches, and the count of issues detected on the changed code on short branches, and are only provided if the project parameter is specified. If the project parameter is specified, requires the user to have 'Browse' or 'Execute analysis' rights on that project. Otherwise, only returns branches from projects on which this user has 'Browse' or 'Execute analysis' rights.
Parameters (2)
branchIds(string, query, optional)
List of up to 50 branch IDs - required unless project key is provided
project(string, query, optional)
Project key - required unless branchIds is provided
import zingu_apis
api = zingu_apis.api("sonarqube")
result = api.fetch("api/project_branches/list", branchIds="uuid1,uuid2,uuid3", project="my_project")
for item in result:
print(item)
const resp = await fetch("https://sonarcloud.io/api/project_branches/list?branchIds=uuid1%2Cuuid2%2Cuuid3&project=my_project");
const data = await resp.json();