Forums

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

How to get all pull requests where i am a reviewer with BitBucket API v2 ?

Vladimir Litvinov March 21, 2019

Hi! I trying to get all pull requests where i am a reviewer via BitBucket API v2, just like in original dashboard.

Can I actually do this without known about user/team and certain repository name ?

1 answer

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 25, 2019

Hello Vladimir and welcome to the Community!

You can use the Bitbucket Cloud REST API v2 to access information about who approved or is assigned to approve a pull request. However, you must have certain information to complete the URL to make the call again. Part of this information does require knowing the username and the repo_slug. Depending on the call and the data you need, you may also have to know the commit number as well. The endpoints I would suggest reviewing for this would be as follows:

I hope this information proves helpful and provides some guidance on how to access information on pull requests.

Regards,
Stephen Sifers   

Vladimir Litvinov March 26, 2019

Thanks for your answer, Stephen. So, V2 API have no endpoint to get all pull requests where you are a reviewer, only through the endpoint a certain repo with filter param, right?

Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 26, 2019

Hello Vladimir,

To have a better context into what exactly you're wanting to do, and to ensure we are able to provide a proper solution, could please share the endpoint you used in the v1 API along with any additions to the URL?

The above would help clarify what you did in the past and allow us to see if it's possible within the v2 API.

Regards,
Stephen Sifers

Vladimir Litvinov March 26, 2019

Hello, Stephen! I never try to using v1 API. I try to get list of pull requests where i am a reviewer, just like on https://bitbucket.org/dashboard/overview 

Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2019

Hello Vladimir,

Thank you for the clarification on the v1 API along with how you're seeing your repos.

The API will only allow you to access one repo at a time, from the endpoints provided above you should be able to then find the repos where you're assigned as a reviewer. This is mainly due to how the API URL is structured to require a specific repo within itself.

I hope this proves helpful and you're able to accomplish what you're looking for.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events