Get the JIRA card from PR by using bitbucket api

I succeeded in using bitbucket api to view my pull requests infomation.

curl -X GET https://user:password@api.bitbucket.org/2.0/repositories/team/repo/pullrequests/prid


Recently I added JIRA's components to Bibucket to get my pull requests to be able to link to JIRA's cards.

擷取.PNG
I can not see from the information downloaded from the API which pull requests  link JIRA card.


Does anyone know why or is there any other API way to know?

1 answer

1 accepted

@Felix Haehnel

Can you help me?

I use 

curl -X GET https://$USERNAEM:$PASSWORD@$TEAM.atlassian.net/rest/jira/1.0/projects/$PROJECTID/repos/$REPOID/pull-requests/$PRID/issues

but got

`Oops, you've found a dead link.`

The bitbucket repoID , PR , jira projectID exist and bitbucket have connected to jira.

Hi, 

I'm not sure where you found the URL you are using, but I don't think it'll work. 

From your question it seems like you are using Atlassian's Cloud offerings (for both Bitbucket and JIRA). 

The URL you are using looks like a Bitbucket Server URL. The Bitbucket Server and Cloud APIs are not the same. 

The bitbucket.org API reference doesn't list anything related to the JIRA integration. 

Unfortunately I'm not familiar with how the JIRA integration works in bitbucket.org, and I couldn't find a public API to retrieve issues linked from a pull request. 

I've added a few more tags to this question, so that maybe someone that knows stumbles upon it. 

If you need an answer quickly, I'd suggest raising a support request on https://support.atlassian.com/bitbucket/

 

Felix

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

26,272 views 26 12
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you