Audit
Content
Content - attachments
Content body
Content - children and descendants
Content - macro body
Content comments
Content labels
Content permissions
Content properties
Content restrictions
Content versions
Content watches
Dynamic modules
Group
Inline tasks
Label info
Long-running task
Relation
Search
Settings
Space
Space permissions
Space properties
Space settings
Template
Themes
Users

Rate this page:

Space permissions

Add new permission to space

POST /wiki/rest/api/space/{spaceKey}/permission

Adds new permission to space.

If the permission to be added is a group permission, the group can be identified by its group name or group id.

Note: Apps cannot access this REST resource - including when utilizing user impersonation.

Permissions required: 'Admin' permission for the space.

Connect apps cannot access this REST resource.

Request

Path parameters
spaceKey Required

string

The key of the space to be queried for its content.

Body parameters

This object represents a single space permission. Permissions consist of at least one operation object with an accompanying subjects object.

The following combinations of operation.key and operation.target values are valid for the operation object:

1
2
3
4
5
'create': 'page', 'blogpost', 'comment', 'attachment'
'read': 'space'
'delete': 'page', 'blogpost', 'comment', 'attachment'
'export': 'space'
'administer': 'space'
id

integer

Format: int64
subject Required

PermissionSubject

The user or group that the permission applies to.

operation Required

object

_links

GenericLinks

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
curl --request POST \
  --url 'https://api.atlassian.com/ex/confluence/:cloudId:/wiki/rest/api/space/{spaceKey}/permission' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 2154,
  "subject": {
    "type": "user",
    "identifier": "<string>"
  },
  "operation": {
    "key": "administer",
    "target": "page"
  },
  "_links": {}
}'

Responses

Returned if the requested content is returned.

Content typeValue
application/json

SpacePermissionV2

Add new custom content permission to space

POST /wiki/rest/api/space/{spaceKey}/permission/custom-content

Adds new custom content permission to space.

If the permission to be added is a group permission, the group can be identified by its group name or group id.

Note: Only apps can access this REST resource and only make changes to the respective app permissions.

Permissions required: 'Admin' permission for the space.

Connect app scope requiredWRITE

Request

Path parameters
spaceKey Required

string

The key of the space to be queried for its content.

Body parameters

This object represents a list of space permissions for custom content type for an individual user. Permissions consist of a subjects object and a list with at least one operation object.

subject Required

PermissionSubject

The user or group that the permission applies to.

operations Required

Array<object>

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
curl --request POST \
  --url 'https://api.atlassian.com/ex/confluence/:cloudId:/wiki/rest/api/space/{spaceKey}/permission/custom-content' \
  --header 'Content-Type: application/json' \
  --data '{
  "subject": {
    "type": "user",
    "identifier": "<string>"
  },
  "operations": [
    {
      "key": "read",
      "target": "<string>",
      "access": true
    }
  ]
}'

Responses

Returned if the requested content is returned.

A schema has not been defined for this response code.

Remove a space permission

DELETE /wiki/rest/api/space/{spaceKey}/permission/{id}

Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space permissions for that user or group.

Note: Apps cannot access this REST resource - including when utilizing user impersonation.

Permissions required: 'Admin' permission for the space.

Connect apps cannot access this REST resource.

Request

Path parameters
spaceKey Required

string

The key of the space to be queried for its content.

id Required

integer

Id of the permission to be deleted.

Example

1
2
curl --request DELETE \
  --url 'https://api.atlassian.com/ex/confluence/:cloudId:/wiki/rest/api/space/{spaceKey}/permission/{id}'

Responses

Permission successfully removed.

Rate this page: