Connect: Permission exception when setting space permissions

A month ago a new endpoint was shipped which allows space permissions to be added via user impersonation.

Doc: https://developer.atlassian.com/cloud/confluence/rest/api-group-space-permissions/#api-api-space-spacekey-permission-post

For the impersonated user all permissions are set:

Payload:

{
  subject: { type: 'user', identifier: '5e3352d0e504e30cabd3e0e4' },
  operation: { key: 'read', target: 'space' }
}

StatusCode: 403
message: com.atlassian.confluence.api.service.exceptions.PermissionException: User isn't authorized to modify permissions.


Additional question:

The api docs specify that: This object represents a single space permission. Permissions consist of at least one operation object with an accompanying subjects object.

  • Does this mean that we can create/update multiple permissions at the same time? Is there an example for it?
  • what is the id field for in the post field? This should not be set by us as it is assigned by atlassian anyways?
  • The example is broken. The operation key: administer and target: page are a non valid combination.
1 Like