rest api call to query the Stash branches

Saurav Tapader July 20, 2016

Hi,

Is there a JIRA rest api endpoint to query with the JIRA number and get back the relevant branches in Stash which we can see in the right hand side of the JIRA under "Development" section. 

Thanks

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Saurav Tapader July 21, 2016

I tried the following:

/rest/dev-status/1.0/issue/detail?issueId=${yourIssueId}&applicationType=stash&dataType=repository

All I am getting is the instance information. The repositories are blank. Also in the response there is no errors listed. I tried with another issue and I am getting back results. The difference is the new issue has branch which has commits in it.

So is it like this that if you just create a branch and yet to add a commit under that new branch, your branch information is not going to show up?

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2016

Does that issue have branches that you can see under dev panel? Are you trying with the same user id?

Saurav Tapader July 21, 2016

Hi Jobin, I updated the comment. PLease take a look.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2016

Probably, yes. I haven't tried all combinations. As long as the branch appears in dev panel, you should get it.

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 20, 2016

You can use /rest/dev-status/1.0/issue/detail?issueId=${yourIssueId}&applicationType=stash&dataType=pullequest

Or use /rest/dev-status/1.0/issue/detail?issueId=${yourIssueId}&applicationType=stash&dataType=repository depending on what details you need.

TAGS
AUG Leaders

Atlassian Community Events