Hi. There is any way to list users in a specific space in Confluence who have administrator privileges?
I tried to use /wiki/rest/api/space/<space-ID?expand=permissions, but I get really log output which is not super clear for me and for sure I cannot find administrator users there.
URL is ok above. In basic python
spaceResponse = requests.get(your url)
jsonSpaceResponse = spaceResponse.json()
for permission in jsonSpaceResponse['results'][0]['permissions']:
if 'group' in permission['subjects']:
print(permission['subjects']['group']['results'][0]['id']) # print group id
if 'user' in permission['subjects'] and permission['subjects']['user']['results'][0]['accountType'] == 'atlassian':
print(permission['subjects']['user']['results'][0]['accountId']) # print user accountId
print(permission['operation']['operation'] + ' ' + permission['operation']['targetType'])
the list of operation and target type:
archive page
restrict_content space
export space
create blogpost
delete attachment
create attachment
delete blogpost
delete comment
delete page
administer space
create page
create comment
delete space
read space
delete blogpost
delete space
delete comment
create blogpost
delete page
create comment
read space
create attachment
archive page
restrict_content space
create page
delete attachment
administer space
export space
Hope this helps