Create
cancel
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 repositories with users and their permissions in bitbucket Rest api 2.0?

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

0 votes
husein I'm New Here Sep 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 Sep 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. :-)

Suggest an answer

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

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,826 views 0 7
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