Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,835
Community Members
 
Community Events
165
Community Groups

Bitbucket admin list for all the existing projects

Hi,

I am looking in to self service Bitbucket access where user can see admins of the repo for all existing repos.

Is there a way to get these details either from Rest API or database query?

Thanks in advance.

Mansi

2 answers

Helo! You can try this

select p.NAME as "PROJECT NAME",
p.DESCRIPTION as "PROJECT DESCRIPTION",
spp.GROUP_NAME as "GROUP WITH ADMIN RIGHTS",
u.NAME as "USER WITH ADMIN RIGHTS"
from
STASH.STA_PROJECT_PERMISSION spp
left join stash.project p
on p.ID = spp.PROJECT_ID
left join stash.sta_normal_user u
on spp.user_id = u.user_id
left join stash.cwd_user cu
on cu.lower_user_name = u.name
left join stash.cwd_membership cm
on cm.lower_parent_name = spp.GROUP_NAME
where
( length(spp.group_name) > 1 or length(spp.user_id) > 1 )
and spp.perm_id > 3
order by p.NAME;

0 votes
Ana Retamal Atlassian Team Apr 04, 2018

Hi Mansi! You could get the admins, but the users wouldn't be able to see them as they don't have the permissions for that (unless you share a list with the users separately to inform them of who are the admins). This other Community thread might help you.

I've done some research and I could find this plugin that might interest you, please note that it's only available for Bitbucket Server.

Hope that helps!

Ana

Hi Ana,

I am looking for REST Api to get project admin list. I am writing my own application and for that I need to send approval request to admins of the project.

In Above thread, there is groovy script attached to it.

 

Thanks,

Mansi

Ana Retamal Atlassian Team Apr 24, 2018

I'm afraid I won't be able to help you with that. There might be other users that can help you with that, but alternatively you can have a look at our developers' resources for more help.

Hope that's useful!

Ana

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,247 views 2 9
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