Getting Jira Issue's Branches from REST API

api, branch, jira, rest

Solution

Found the rest url I was looking for and so far I have found zero documentation on it. Anyway I am going to use it as this is the actual url that Jira uses in the user interface.

{Jira App Url}/rest/dev-status/latest/issue/detail?issueId={IssueKey}&applicationType=stash&dataType=pullrequest

Problem

I am working with the Atlassian product Jira's REST API, combined with Stash. I have the two applications linked so that I can create branches in Stash for the Jira tickets. That is all working great, but what I need is a REST API call or really any call to get the branches for the issue to help automate our development process. ``` /rest/api/2/{issueid} // Doesn't work ``` The standard issue pull, Atlassian documentation https://docs.atlassian.com/jira/REST/6.0.1/#id147461, doesn't give me any information about the branches created for the issue. The only other way I can think of to get the information is to scan every project's repo for the specific name of the ticket, which sounds wildly inefficient. I'm using: Jira version 6.2.6 Stash version 3.0.1

Original source