How can I edit confluence space permissions by rest api?
Do the same as UI http://mydomain/spaces/doeditspacepermissions.action?key=MySpace do.
Is any rest api available?
I have tried what the section 'Get users and groups assigned as Space Administrators to a Space' in document https://jira.atlassian.com/browse/CONFSERVER-44329 says.
But the response is {"id":7,"error":{"code":-32601,"message":"RPC method not found: getSpacePermissionSet taking 0 parameters","data":null},"jsonrpc":"2.0"}
Then I tried uri /rpc/json-rpc/confluenceservice-v2/getSpacePermissionSets?os_authType=basic , my request body is {"type":"VIEWSPACE","spacePermissions":"[{\"type\":\"VIEWSPACE\",\"groupName\":\"leader\"}]"}.
But the response is {"id":null,"error":{"code":-32602,"message":"Request parameter types did not match method parameter types (method getSpacePermissionSets taking 1 parameters)","data":null},"jsonrpc":"2.0"}
Finally, I see the document https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-add-space-permissions-using-Confluence-API/qaq-p/516789
POST URI
/rpc/json-rpc/confluenceservice-v2/addPermissionsToSpace
is very useful.
I know this is from long time ago, but were you able to structure the data for addPermissionsToSpace?
Im trying below data and keep getting the error you posted on top
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.