The Branches REST API will obtain list of branches associated to a Jira issue.
There are two types of users who can perform the Branches API call:
- Jira administrators
- Jira user who has all of the following:
- View/browse permissions to the project;
- View Development Tools permissions to the same project; and
- The repository is associated to the project.
url
{JiraBaseURL}/rest/gitplugin/1.0/issues/branches?key={issuekey}
method
GET
Parameters
Field | Description |
---|---|
issueKey | String. Optional.
This is the Jira Issue Key – a concatenation of Project key and Issue number. It must contain a dash (‘-‘). The issueKey must be valid and existent. For example: |
Response
If the optional query is not defined, it will return all indexed git branches.
Example
http://jira.yourorg.com/rest/gitplugin/1.0/issues/branches?key=TEST-435
Result:
{
"success":true,
"branches":["master","release","TEST-435"]
}