Git Integration for Jira Self-Managed (Data Center/Server) Documentation

Contact Support

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"

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


« Back to REST API index

Have feedback about this article? Did we miss something? Let us know!
On this page