The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to get all repositories with users and their permissions in bitbucket Rest api 2.0?

Arunkarthik Vijayasekaran
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 15, 2020

Hi,
How to get all repositories with users and their permissions in bitbucket rest api 2.0?
1.I have tried for normal user credentials with url "https://api.bitbucket.org/2.0/repositories" returned empty response.
2.I have tried for normal user credentials with url "https://api.bitbucket.org/2.0/users/{MyUserName}/repositories" returned a response data of my 14 available repositories, but there is no details about users and their permissions.
So please suggest How to get all repositories with users and their permissions in bitbucket api 2.0.

Thanks,

Arunkarthik.V

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
husein
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!
September 24, 2020

I am getting the same issue, however, if you check the Network tab in Chrome, you will see the following call being made:

https://bitbucket.org/!api/2.0/repositories/<workspace id>?page=1&pagelen=25&sort=-updated_on&q=

And this actually retrieves the data. So the question is then, why can't we use api.bitbucket.org URL? Is the above Atlassian's private way of accessing or an undocumented way to get the repos?

husein
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!
September 24, 2020

OK, I just figured out the problem on my end. Instead of using Authorization in Header, I used Authentication. For this reason it was making unauthenticated calls and it couldn't retrieve anything. :-)

TAGS
AUG Leaders

Atlassian Community Events