Branches API

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:

  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

url

/rest/gitplugin/1.0/issues/branches?key={issuekey}

method

GET

parameters

Parameter

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: TST-435.

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="TST-435"

1 2 3 4 5 Result: { "success":true, "branches":["master","release","TST-435"] }

 

REST APIs