Forums

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

How do I get the admin from a space from an api?

Mark Matchynski September 7, 2021

Is there an api to get the admin for a space? I was able to use the /audit end point but the values get older and older and I have to page through many pages to get the data I need.  I would like to be able to have automation send an email to the space admin group for a confluence space. I am using Confluence 7.13.0 hosted on our internally managed confluence site.

3 answers

1 vote
Moses Ebrahimi
Contributor
February 3, 2023

Hi @Mark Matchynski 

I know this is from long ago, but I came across the similar task now to put a python script together to list all the space name and keys as well as administrators of the space. 

Pretty easy to get name and key but somehow I cant find a way to get space administrators. Im trying to loop over spaces by using "confluence.get_space(space_key)" but there is no sign of admins. Did you have any luck with this? 

Thank you

Moses

0 votes
Kishan Sharma
Community Champion
September 8, 2021

Hi @Mark Matchynski 

It is not possible through the REST API, but you can still use the legacy RPC API to administrate Space Permissions. Please refer this feature request, you will find a working example (Get all permissions associated to a Space) in the workaround section.

0 votes
Alexis Robert
Community Champion
September 8, 2021

Hi @Mark Matchynski , 

 

I don't think that the API provides such a feature. What you could do instead is create a group "space-admin" where you'll have all the people that are admin for a space in Confluence, and then send emails to this group.

Otherwise, you can always try to get this information directly from the database. Some documentation is provided by Atlassian here : https://confluence.atlassian.com/confkb/how-to-check-permissions-for-a-space-via-sql-queries-717062216.html

 

Let me know if this helps, 

 

--Alexis

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events