Rate this page:
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.
Permissions required: 'Admin' permission for the space.
Apps cannot access this REST resource.
string
The key of the space to be queried for its content.
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'
integer
int64
The user or group that the permission applies to.
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": {}
}'
Returned if the requested content is returned.
Content type | Value |
---|---|
application/json |
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.
Permissions required: 'Admin' permission for the space.
Apps cannot access this REST resource.
string
The key of the space to be queried for its content.
integer
Id of the permission to be deleted.
1 2
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/permission/{id}'
Permission successfully removed.
Rate this page: