Bitbucket pullrequests api is pulling limited information

Am in the process of creating a visualization to reflect the aging pull requests waiting for approvals.

In this process am finding that “API reflects only those pull requests information associated with the credentials am using for triggering API”.
I mean, if i use my credentials of user1 to trigger the API, it returns the pull requests created by only the user1 despite it has admin privileges over the bitbucket-dev instance.
https://bitbucket-dev.xxxxxxxxxxx.local/rest/api/1.0/dashboard/pull-requests?state=OPEN&participantStatus=UNAPPROVED
So, am exploring ways to make the API to return all the Pull requests irrespective whoever is created.
Please let me know in case of any inputs. Thank You.

Hey there :wave: ,

If I remember correctly, Bitbucket does not offer a way to list “all pull requests I’m allowed to see”.

However, you could get a list of all repositories in the relevant organisation, and get all open pull request of those. Here are some links that might help you:

I hope this helps you!

Edit: I just noticed that you want to do this on server/data center, and not on cloud. my apologies - I guess the same should be possible on server?

1 Like

Thanks for looking into this.
We are using Atlassian Bitbucket v5.15.1 and is supporting only 1.0 version for api
https://bitbucket-dev.xxxxxxxxxxxxxxxxxx.local/rest/api/1.0/

I guess it is a blocker for us as we can not use any of the features offered by 2.0 :cry:
/2.0/repositories/{workspace}/{repo_slug}/pullrequests

I guess you could use the following endpoints from the v1.0 of the api:

1 Like