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 ?
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.