March 28th 1 PM ET
Free Workshop: Escape the chaos of context-switching

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

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.

 

url

/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: TEST-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=TEST-435

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

 


 

« Back to REST API index

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