Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

By using restful API, how I can retrieves all bitbucket pull request IDs from Jira issue ID?

cngufeng1
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 1, 2025

I want to write a Python program that uses Atlassian's Jira and Bitbucket. By inputting an issue number, it should be able to retrieve all pull requests related to that issue. How can this be achieved?

1 answer

0 votes
Humashankar VJ
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 2, 2025

Hi @cngufeng1 

You can retrieve all Bitbucket pull requests linked to a Jira issue using the Jira REST API endpoint:

/rest/dev-status/1.0/issue/detail?issueKey=PROJ-123&applicationType=bitbucket&dataType=pullrequest.

  • This will return detailed pull request information, including PR ID, title, URL, status, and repository.
  • Make sure your Jira and Bitbucket are properly integrated via DVCS or application links for this to work.
  • The PR must mention the Jira issue key in its title, commit, or branch to be associated automatically.
    Refer to the below Atlassian support guide for full response structure and examples.

How to retrieve Pull request and Bitbucket repo and branch information from an issue using REST API | Jira and Jira Service Management | Atlassian Support

Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards

Suggest an answer

Log in or Sign up to answer