Confluence Rest API to add space permission

Mohamed Adel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 28, 2019

is there Rest API function to add permission to users in confluence , I tried to use the XMLRPC remote API through scriptrunner but it didn't work 

I added a custom plugin that include  XMLRPC 3rd libraries with no success too 

 

 

2 answers

1 accepted

0 votes
Answer accepted
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 29, 2019

Hello there Mohamed!

Currently, this is not possible by using REST API with Confluence.

We have a Feature Request that tackles this. You can check the request here:

Ability to set space permissions via REST API

However, a third-party plugin may help your objective! You could check Bobswift Command Line Interface (CLI) for Confluence:

How to Get All Space Permissions

We are looking specifically at the addPermissions parameter:

CLI Commands - addPermissions

Let us know if this helps you out!

Mohamed Adel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2019

Thanks @Diego 

paulburchak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 20, 2019

@Mohamed Adel I'm trying to find a way to set space permissions using REST API as well. Have @Diego links help to find a solution? If yes, could you please help me and send any references on it? I havent find any Feature Request mentioned in his answer...

Mohamed Adel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 20, 2019

I found another way . Using Power scripts for confluence plugin . It is free and you can write your own webhook using their simple language then you will be able to call the webhook as rest function easily.

Like # people like this
paulburchak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2019

Thanks @Mohamed Adel 

1 vote
Ken McClean
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 18, 2023

For anyone looking at this in 2023, these answers are no longer correct. It is possible to use REST to manage Confluence Space permissions.

The trick is that you cannot do it from WITHIN Confluence.  The REST API endpoint is only available if you're not an App (i.e. this rules out ScriptRunner).

https://www.kennethmcclean.com/blog/scripting-confluence-cloud-space-permissions/

Rahul Raj January 30, 2023

@Ken We are looking for an API for Confluence Data Center, not for Cloud. The solution you are talking about won't work for Data Center.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events