GET

Get all space permissions

Returns list of permissions granted to users and groups in the particular space.

Example request URI's: https://example.com/confluence/rest/api/space/TESTSPACE/permissions

Request

Path parameters

spaceKey

string

Required

Responses

Returns a JSON representation of all permissions granted to users/groups/anonymous user in specified space.

application/json

array<SpacePermission>

GET/rest/api/space/{spaceKey}/permissions
1 2 3 curl --request GET \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/permissions' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 [ { "operation": { "targetType": "space", "operationKey": "read" }, "subject": { "displayName": "<string>", "type": "<string>" }, "spaceKey": "<string>", "spaceId": 2154 } ]
POST

Set permissions to multiple users/groups/anonymous user in the given space

Sets permissions to multiple users/groups in the given space. Request should contain all permissions that user/group/anonymous user will have in a given space. If permission is absent in the request, but was granted before, it will be revoked. If empty list of permissions passed to user/group/anonymous user, then all their existing permissions will be revoked. If user/group/anonymous user not mentioned in the request, their permissions will not be revoked.

Maximum 40 different users/groups/anonymous user could be passed in the request.

See Space Permissions documentation for additional information about supported permissions.

Example request URI's: https://example.com/confluence/rest/api/space/TESTSPACE/permissions

Request

Path parameters

spaceKey

string

Required

Request bodyapplication/json

array<SpacePermissionsForSubject>

userKey

string

groupName

string

operations

array<OperationDescription>

Responses

Space permissions successfully set.

application/json

any

POST/rest/api/space/{spaceKey}/permissions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 curl --request POST \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/permissions' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '[ { "userKey": "4028ae289154667d0191546e11a10001", "operations": [ { "operationKey": "read", "targetType": "space" }, { "operationKey": "administer", "targetType": "space" } ] }, { "groupName": "group1", "operations": [ { "operationKey": "read", "targetType": "space" }, { "operationKey": "create", "targetType": "comment" } ] }, { "operations": [ { "operationKey": "read", "targetType": "space" } ] } ]'
GET

Gets the permissions granted to an anonymous user in a space

Returns list of permissions granted to anonymous user in the particular space.

Example request URI's: https://example.com/confluence/rest/api/space/TESTSPACE/permissions/anonymous

Request

Path parameters

spaceKey

string

Required

Responses

Returns a JSON representation of the space permissions granted to the anonymous user.

application/json

array<SpacePermission>

GET/rest/api/space/{spaceKey}/permissions/anonymous
1 2 3 curl --request GET \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/permissions/anonymous' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 [ { "operation": { "targetType": "space", "operationKey": "read" }, "subject": { "displayName": "<string>", "type": "<string>" }, "spaceKey": "<string>", "spaceId": 2154 } ]
GET

Gets the permissions granted to a group in a space

Returns list of permissions granted to a group in the particular space.

Example request URI's: https://example.com/confluence/rest/api/space/TESTSPACE/permissions/group/test-group-name

Request

Path parameters

spaceKey

string

Required
groupName

string

Required

Responses

Returns a JSON representation of the space permissions granted to the group.

application/json

array<SpacePermission>

GET/rest/api/space/{spaceKey}/permissions/group/{groupName}
1 2 3 curl --request GET \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/permissions/group/{groupName}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 [ { "operation": { "targetType": "space", "operationKey": "read" }, "subject": { "displayName": "<string>", "type": "<string>" }, "spaceKey": "<string>", "spaceId": 2154 } ]
GET

Gets the permissions granted to a user in a space

Returns list of permissions granted to user in the particular space.

Example request URI's: https://example.com/confluence/rest/api/space/TESTSPACE/permissions/user/4028ae289154667d0191546bd5840000

Request

Path parameters

spaceKey

string

Required
userKey

string

Required

Responses

Returns a JSON representation of the space permissions granted to the user.

application/json

array<SpacePermission>

GET/rest/api/space/{spaceKey}/permissions/user/{userKey}
1 2 3 curl --request GET \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/permissions/user/{userKey}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 [ { "operation": { "targetType": "space", "operationKey": "read" }, "subject": { "displayName": "<string>", "type": "<string>" }, "spaceKey": "<string>", "spaceId": 2154 } ]
PUT

Grants space permissions to anonymous user

Grant permissions to anonymous user in the given space. Operation doesn't override existing permissions, will only add those one that weren't granted before. Multiple permissions could be passed in one request. Supported targetType and operationKey pairs:

  • space read
  • space administer
  • space export
  • space restrict
  • space delete_own
  • space delete_mail
  • page create
  • page delete
  • blogpost create
  • blogpost delete
  • comment create
  • comment delete
  • attachment create
  • attachment delete

See Space Permissions documentation for additional information about supported permissions.

Example request URI's: https://example.com/confluence/rest/api/space/TESTSPACE/permissions/anonymous/grant

Request

Path parameters

spaceKey

string

Required

Request bodyapplication/json

array<OperationDescription>

targetType

string

operationKey

string

Responses

Space permissions successfully granted to anonymous user.

PUT/rest/api/space/{spaceKey}/permissions/anonymous/grant
1 2 3 4 5 6 7 8 9 10 11 12 13 curl --request PUT \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/permissions/anonymous/grant' \ --header 'Content-Type: application/json' \ --data '[ { "targetType": "space", "operationKey": "read" }, { "targetType": "page", "operationKey": "create" } ]'
PUT

Grants space permissions to a group

Grant permissions to a group in the given space. Operation doesn't override existing permissions, will only add those one that weren't granted before. Multiple permissions could be passed in one request. Supported targetType and operationKey pairs:

  • space read
  • space administer
  • space export
  • space restrict
  • space delete_own
  • space delete_mail
  • page create
  • page delete
  • blogpost create
  • blogpost delete
  • comment create
  • comment delete
  • attachment create
  • attachment delete

See Space Permissions documentation for additional information about supported permissions.

Example request URI's: https://example.com/confluence/rest/api/space/TESTSPACE/permissions/group/test-group-name/grant

Request

Path parameters

spaceKey

string

Required
groupName

string

Required

Request bodyapplication/json

array<OperationDescription>

targetType

string

operationKey

string

Responses

Space permissions successfully granted to a group.

PUT/rest/api/space/{spaceKey}/permissions/group/{groupName}/grant
1 2 3 4 5 6 7 8 9 10 11 12 13 curl --request PUT \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/permissions/group/{groupName}/grant' \ --header 'Content-Type: application/json' \ --data '[ { "targetType": "space", "operationKey": "read" }, { "targetType": "page", "operationKey": "create" } ]'
PUT

Grants space permissions to a user

Grant permissions to a user in the given space. Operation doesn't override existing permissions, will only add those one that weren't granted before. Multiple permissions could be passed in one request. Supported targetType and operationKey pairs:

  • space read
  • space administer
  • space export
  • space restrict
  • space delete_own
  • space delete_mail
  • page create
  • page delete
  • blogpost create
  • blogpost delete
  • comment create
  • comment delete
  • attachment create
  • attachment delete

See Space Permissions documentation for additional information about supported permissions.

Example request URI's: https://example.com/confluence/rest/api/space/TESTSPACE/permissions/user/4028ae289154667d0191546bd5840000/grant

Request

Path parameters

spaceKey

string

Required
userKey

string

Required

Request bodyapplication/json

array<OperationDescription>

targetType

string

operationKey

string

Responses

Space permissions successfully granted to a user.

PUT/rest/api/space/{spaceKey}/permissions/user/{userKey}/grant
1 2 3 4 5 6 7 8 9 10 11 12 13 curl --request PUT \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/permissions/user/{userKey}/grant' \ --header 'Content-Type: application/json' \ --data '[ { "targetType": "space", "operationKey": "read" }, { "targetType": "page", "operationKey": "create" } ]'
PUT

Revoke space permissions from anonymous user

Revoke permissions from anonymous user in the given space. If anonymous user doesn't have permissions that we are trying to revoke, those permissions will be silently skipped. Multiple permissions could be passed in one request. Supported targetType and operationKey pairs:

  • space read
  • space administer
  • space export
  • space restrict
  • space delete_own
  • space delete_mail
  • page create
  • page delete
  • blogpost create
  • blogpost delete
  • comment create
  • comment delete
  • attachment create
  • attachment delete

See Space Permissions documentation for additional information about supported permissions.

Example request URI's: https://example.com/confluence/rest/api/space/TESTSPACE/permissions/anonymous/revoke

Request

Path parameters

spaceKey

string

Required

Request bodyapplication/json

array<OperationDescription>

targetType

string

operationKey

string

Responses

Space permissions successfully removed for anonymous user.

PUT/rest/api/space/{spaceKey}/permissions/anonymous/revoke
1 2 3 4 5 6 7 8 9 10 11 12 13 curl --request PUT \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/permissions/anonymous/revoke' \ --header 'Content-Type: application/json' \ --data '[ { "targetType": "page", "operationKey": "delete" }, { "targetType": "page", "operationKey": "create" } ]'
PUT

Revoke space permissions from a group

Revoke permissions from a group in the given space. If group doesn't have permissions that we are trying to revoke, those permissions will be silently skipped. Multiple permissions could be passed in one request. Supported targetType and operationKey pairs:

  • space read
  • space administer
  • space export
  • space restrict
  • space delete_own
  • space delete_mail
  • page create
  • page delete
  • blogpost create
  • blogpost delete
  • comment create
  • comment delete
  • attachment create
  • attachment delete

See Space Permissions documentation for additional information about supported permissions.

Example request URI's: https://example.com/confluence/rest/api/space/TESTSPACE/permissions/group/test-group-name/revoke

Request

Path parameters

spaceKey

string

Required
groupName

string

Required

Request bodyapplication/json

array<OperationDescription>

targetType

string

operationKey

string

Responses

Space permissions successfully removed for a group.

PUT/rest/api/space/{spaceKey}/permissions/group/{groupName}/revoke
1 2 3 4 5 6 7 8 9 10 11 12 13 curl --request PUT \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/permissions/group/{groupName}/revoke' \ --header 'Content-Type: application/json' \ --data '[ { "targetType": "page", "operationKey": "delete" }, { "targetType": "page", "operationKey": "create" } ]'
PUT

Revoke space permissions from a user

Revoke permissions from a user in the given space. If user doesn't have permissions that we are trying to revoke, those permissions will be silently skipped. Multiple permissions could be passed in one request. Supported targetType and operationKey pairs:

  • space read
  • space administer
  • space export
  • space restrict
  • space delete_own
  • space delete_mail
  • page create
  • page delete
  • blogpost create
  • blogpost delete
  • comment create
  • comment delete
  • attachment create
  • attachment delete

See Space Permissions documentation for additional information about supported permissions.

Example request URI's: https://example.com/confluence/rest/api/space/TESTSPACE/permissions/user/4028ae289154667d0191546bd5840000/revoke

Request

Path parameters

spaceKey

string

Required
userKey

string

Required

Request bodyapplication/json

array<OperationDescription>

targetType

string

operationKey

string

Responses

Space permissions successfully removed for a user.

PUT/rest/api/space/{spaceKey}/permissions/user/{userKey}/revoke
1 2 3 4 5 6 7 8 9 10 11 12 13 curl --request PUT \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/permissions/user/{userKey}/revoke' \ --header 'Content-Type: application/json' \ --data '[ { "targetType": "page", "operationKey": "delete" }, { "targetType": "page", "operationKey": "create" } ]'

Rate this page: