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.

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://your-domain.atlassian.net/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

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.

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://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/permission/{id}'

Responses

Permission successfully removed.

Rate this page: