Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA REST API to get list of branches related to a issue


How do i get the list of branches related to a issue using JIRA REST API.  i tried using the rest/api/2/issue/. but it doesn't return any information related to the branches.

Any Help would be appreciated.

1 answer

2 votes

Hi Visigan,

I've been having a look and wasn't able to find an official REST api but when I looked at how Jira itself was getting the data (pull requests but also branches) I've found the following call:

GET /rest/dev-status/1.0/issue/detail?issueId=<ISSUEID>&applicationType=bitbucket&dataType=pullrequest

Unfortunately the request requires the issue ID and not the issue Key. So you'll need to retrieve the issue ID using the Jira Issue REST api first (/rest/api/latest/issue/<ISSUEKEY>) first.

Please do keep in mind this is not an official API which could be changed between Jira versions without any notification.



Thanks, Maarteen

it works for me, but there is an issue. The JSON returns all the commits but only the part of the files committed. if i commit more than 5 files on a single commit, then only the first 5 files are listed in the JSON. any ways to get the full list of files?

I’m afraid that using the api of either Bitbucket or github in this case will be the only option.



I tried them too, /rest/api/1.0/projects/{Project}/repos/{Repo}/commits/{commit id} is not returning any information about the files. do you aware of any other bitbucket API which gives me the list of files related to a commit.

I am receiving response as 200 but no details are pulled

{    "errors": [],    "detail": []}

@Yasashree, use "stash" instead of "bitbucket.  The following worked for me:

GET /rest/dev-status/1.0/issue/detail?issueId=<ISSUEID>&applicationType=stash&dataType=pullrequest
ashwin I'm New Here Mar 21, 2021

what is the applicationType for Azure ?

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you