Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

How to get all the pull request for any User using REST api



I am trying to create a simple dashboard for our organization which shows the logged-in user the tasks which are open in their plate.  Below is an overview of what I am trying to do.

Screenshot from 2020-03-13 23-09-00.png


Question :

We are using the On-Premise Bitbucket server.

Is there a way to get all the PR's based on 'name' or 'email Id' using REST apis?

I looked into, but couldn't find a way to solve my problem.


Any help will be greatly appreciated.


Thanks in advance,





1 answer

It is possible, but you have to get all the pull requests and then sort them based on the user. You can use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests to get your pull requests and then /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId} to get each individual PR. Look for author in the returned response.

@Mikael Sandberg Thanks a lot for the quick reply.


I have tried this endpoint.

But currently, our organization has 19 projects and in total 227 repositories and this number is bound to increase over time.


Since I am building a dashboard and expecting the data in real-time, iterating on all these repos is not a feasible solution.


Do you know any other way to narrow down the search?


Thanks and regards,


Hey @supreeth you can try using the `/rest/api/1.0/dashboard/pull-requests` resource to get all the pull requests for the current logged in user:



Hi @Maciej Adamczak - is there any way to get the dashboard for another user?  For example, if you are a project manager and you want to be able to see all of the Pull Requests of the people on your team.

I also tried to see if the all-pull-requests had a REST API (as that should hopefully speed up @Mikael Sandberg 's suggestion) but I can't find any docs about a REST API for tht plugin.

@J_ E_ Unfortunately Bitbucket doesn't have a REST endpoint that works with all the pull requests. The only supported REST API is the one for a repository pull requests:

As for accessing a dashboard of another user, Bitbucket doesn't have this feature either.


Maciej Adamczak
Bitbucket Developer

I'm interested in this as well. Basically I'm looking for a rest call that lists all the PRs on the page: /plugins/servlet/all-pull-requests/all?state=open

We're in a similar situation with lots of projects and repos. Individually requesting PRs in each repo is not practical.


It's possible to parse the above page and get what I want, but that will be very hacky and error prone


@supreeth did you find a solution for this?



Eric Smith

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,818 views 10 16
Read article

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