« Hooks & API

Branches

Last Updated: March 25, 2019

This API will obtain list of branches associated to a ticket.

important
There are two types of users who can perform the Branches API call:
  1. Jira administrators
  2. Jira user who has all of the following:
    1. View/browse permissions to the project;
    2. View Development Tools permissions to the same project; and
    3. The repository is associated to the project.
Branches REST API
url
rest/gitplugin/1.0/issues/branches?key={issuekey}
method
GET
parameters
{issuekey}
Optional.  Jira issue key       Example: "TST-435"
result
Supply a Jira issue key to this optional query to return indexed git branches for that Jira issue.
If optional query is not defined, it will return all indexed git branches.
Example:
http://jira.yourorg.com/rest/gitplugin/1.0/issues/branches?key="TST-435"

 

Result:
{
    "success":true,
    "branches":["master","release","TST-435"]
}

« Hooks & API