Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is it possible to change Confluence space permissions via external integration?

Jordan Packer March 10, 2016

I know that a space can be created via the REST API, but what about changing the permissions for the space? Is there any way to do that from an external call? Or am I going to need a plugin to do this (either my own or possibly Bob Swift's CLI)?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
NotTheRealStephenSifersNOPENOPENOPENOPE
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.
March 10, 2016

Yes you can edit/update page restrictions from the REST API:

https://docs.atlassian.com/confluence/REST/latest/

/rest/api/content/{id}/restriction/byOperation

resource-wide template parameters
parametervaluedescription

id

string

the id of the content

Methods

GET

/rest/api/content/{id}/restriction/byOperation?expand

 

Returns info about all restrictions by operation

 

request query parameters
parametervaluedescription

expand

string

Default:update.restrictions.user,read.restrictions.group,read.restrictions.user,update.restrictions.group

a comma separated list of properties to expand on the content properties. Default value: group.

available response representations:

  • 200 - application/json (restriction) [expand]
Jordan Packer March 10, 2016

Isn't that just a GET? That couldn't be used to update restrictions, could it? And even if it could, would this be able to update space permissions (not page-specific restrictions)?

Like 于志鹏 likes this
NotTheRealStephenSifersNOPENOPENOPENOPE
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.
March 10, 2016

Seems I miss spoke, the SOAP API will allow you to do it, not the REST API.

https://developer.atlassian.com/confdev/confluence-rest-api/confluence-xml-rpc-and-soap-apis

Seems someone else has already asked a similar question which may be helpful:

https://answers.atlassian.com/questions/328398

Jordan Packer March 10, 2016

Ah, yeah I don't think I want SOAP since it's been deprecated. Looks like I may be stuck with using a plugin (either purchasing one or writing my own). Thanks for your help.

B_ Normann P_ Nielsen
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.
October 26, 2016

I am trying to achive the same https://answers.atlassian.com/questions/43579758

Seems the only way is (java) or the Scriptrunner from Adaptavist, but the latter does not have good documentation. And Confluence 6 does not seem (at the moment) to have more REST

TAGS
AUG Leaders

Atlassian Community Events