Bitbucket admin list for all the existing projects

Mansi Patel April 2, 2018

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

1 vote
Team Atlassian September 12, 2021

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
Atlassian Team members are employees working across the company in a wide variety of roles.
April 4, 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

Mansi Patel April 23, 2018

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
Atlassian Team members are employees working across the company in a wide variety of roles.
April 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
AUG Leaders

Atlassian Community Events