REST API - Content Permissions
- 1 Users
- 1.1 Get inherited content permission by content id
- 1.2 Get inherited content permission by content name
- 1.3 Get content permission by content id
- 1.4 Get content permission by content name
- 1.5 Add content permission by content id
- 1.6 Add content permission by content name
- 1.7 Remove content permission by content id
- 1.8 Remove content permission by content name
- 1.9 Remove all content permission
- 2 Groups
- 2.1 Get inherited content permission by content id
- 2.2 Get inherited content permission by content name
- 2.3 Get content permission by content id
- 2.4 Get content permission by content name
- 2.5 Add content permission by content id
- 2.6 Add content permission by content name
- 2.7 Remove content permission by content id
- 2.8 Remove content permission by content name
- 2.9 Remove all content permission
Available since v. 2.14.0
Added content permission REST APIs
Users
Get inherited content permission by content id
Returns full inherited permissions to the level of a specific content (full tree with space permissions) - checks all user permissions, assigned personally and by user groups
Available only for Confluence Administrator
Method type: GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_ID}/user/{USER_NAME}/getInheritedContentPermission
where {USER_NAME} is the user name
where {CONTENT_ID} is the content id
Parameters:
showContentDetails - adds extra space and content information such as key, name, etc.
Response format: JSON
Example response:
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
{
"contentId": 819212,
"hasContentViewPermission": true,
"hasContentEditPermission": false,
"hasSpaceEditPermission": true,
"hasSpaceViewPermission": true,
"contentTree": [
{
"level": 1,
"hasContentEditPermission": true,
"contentId": 819204,
"hasContentViewPermission": true
},
{
"level": 2,
"hasContentEditPermission": true,
"contentId": 819206,
"hasContentViewPermission": true
},
{
"level": 3,
"hasContentEditPermission": true,
"contentId": 819208,
"hasContentViewPermission": true
},
{
"level": 4,
"hasContentEditPermission": false,
"contentId": 819210,
"hasContentViewPermission": true
},
{
"level": 5,
"hasContentEditPermission": false,
"contentId": 819212,
"hasContentViewPermission": true
}
]
}
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
"contentId": 819212,
"contentType": "page",
"contentCreatorName": "admin",
"contentName": "Content name A",
"spaceKey": "SPACEA",
"spaceName": "TEST SPACE A",
"hasContentEditPermission": false,
"hasContentViewPermission": true,
"hasSpaceEditPermission": true,
"hasSpaceViewPermission": true
"contentTree": [
{
"level": 1,
"hasContentEditPermission": true,
"contentId": 819204,
"hasContentViewPermission": true,
"contentType": "page",
"contentCreatorName": "admin",
"contentName": "CONTENT NAME AA"
},
{
"level": 2,
"hasContentEditPermission": true,
"contentId": 819206,
"hasContentViewPermission": true,
"contentType": "page",
"contentCreatorName": "admin",
"contentName": "CONTENT NAME BB"
},
{
"level": 3,
"hasContentEditPermission": true,
"contentId": 819208,
"hasContentViewPermission": true,
"contentType": "page",
"contentCreatorName": "admin",
"contentName": "CONTENT NAME CC"
},
{
"level": 4,
"hasContentEditPermission": false,
"contentId": 819210,
"hasContentViewPermission": true,
"contentType": "page",
"contentCreatorName": "admin",
"contentName": "CONTENT NAME DD"
},
{
"level": 5,
"hasContentEditPermission": false,
"contentId": 819212,
"hasContentViewPermission": true,
"contentType": "page",
"contentCreatorName": "admin",
"contentName": "CONTENT NAME EE"
}
]
}
Get inherited content permission by content name
Returns full inherited permissions to the level of a specific content (full tree with space permissions) - checks all user permissions, assigned personally and by user groups
Available only for Confluence Administrator
Method type: GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_NAME}/user/{USER_NAME}/space/{SPACE_KEY}/getInheritedContentPermission
where {USER_NAME} is the user name
where {SPACE_KEY} is the space key
where {CONTENT_NAME} is the content name
Parameters:
showContentDetails - adds extra space and content information such as key, name, etc.
Response format: JSON
Example response:
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
{
"contentId": 819212,
"hasContentViewPermission": false,
"hasContentEditPermission": false,
"hasSpaceEditPermission": true,
"hasSpaceViewPermission": true,
"contentTree": [
{
"level": 1,
"hasContentEditPermission": true,
"contentId": 819204,
"hasContentViewPermission": true
},
{
"level": 2,
"hasContentEditPermission": true,
"contentId": 819206,
"hasContentViewPermission": true
},
{
"level": 3,
"hasContentEditPermission": true,
"contentId": 819208,
"hasContentViewPermission": true
},
{
"level": 4,
"hasContentEditPermission": false,
"contentId": 819210,
"hasContentViewPermission": true
},
{
"level": 5,
"hasContentEditPermission": false,
"contentId": 819212,
"hasContentViewPermission": false
}
]
}
Get content permission by content id
Returns information whether the content contains a personal permissions without taking inheritance and space permissions
Available only for Confluence Administrator
Method type: GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_ID}/user/{USER_NAME}/getContentPermission
where {USER_NAME} is the user name
where {CONTENT_ID} is the content id
Parameters:
showContentDetails - adds extra space and content information such as key, name, etc.
Response format: JSON
Example response:
1
2
3
4
5
{
"contentId": 819212,
"hasContentViewPermission": false,
"hasContentEditPermission": false
}
Get content permission by content name
Returns information whether the content contains a personal permissions without taking inheritance and space permissions
Available only for Confluence Administrator
Method type: GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_NAME}/user/{USER_NAME}/space/{SPACE_KEY}/getContentPermission
where {USER_NAME} is the user name
where {SPACE_KEY} is the space key
where {CONTENT_NAME} is the content name
Parameters:
showContentDetails - adds extra space and content information such as key, name, etc.
Response format: JSON
Example response:
1
2
3
4
5
{
"contentId": 819212,
"hasContentViewPermission": false,
"hasContentEditPermission": false
}
Add content permission by content id
Available only for Confluence Administrator
Method type: PUT
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/user/{USER_NAME}/permission/{PERMISSION_TYPE}/addContentPermission
where {USER_NAME} is the user name
where {PERMISSION_TYPE} is the permission type (view or edit)
Request format: JSON
Example request: Content id as an array
1
2
3
4
5
{
"contents":[
1111111, 2222222, 1234567
]
}
Response format: JSON
Example response:
1
2
3
4
5
6
7
8
{
"total": 1,
"added": [
819206
],
"skipped": [],
"status": "done"
}
Add content permission by content name
Available only for Confluence Administrator
Method type: PUT
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/user/{USER_NAME}/permission/{PERMISSION_TYPE}/space/{SPACE_KEY}/addContentPermission
where {USER_NAME} is the user name
where {PERMISSION_TYPE} is the permission type (view or edit)
where {SPACE_KEY} is the space key
Request format: JSON
Example request: Content name as an array
1
2
3
4
5
{
"contents":[
"Page one", "Page two"
]
}
Response format: JSON
Example response:
1
2
3
4
5
6
7
8
{
"total": 0,
"added": [],
"skipped": [
"Page two"
],
"status": "done"
}
Remove content permission by content id
Available only for Confluence Administrator
Method type: DELETE
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/user/{USER_NAME}/permission/{PERMISSION_TYPE}/removeContentPermission
where {USER_NAME} is the user name
where {PERMISSION_TYPE} is the permission type (view or edit)
Request format: JSON
Example request: Content id as an array
1
2
3
4
5
{
"contents":[
1111111, 2222222, 3333333
]
}
Response format: JSON
Example response:
1
2
3
4
5
6
7
8
9
10
{
"total": 2,
"removed": [
2222222, 3333333
],
"skipped": [
1111111
],
"status": "done"
}
Remove content permission by content name
Available only for Confluence Administrator
Method type: DELETE
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/user/{USER_NAME}/permission/{PERMISSION_TYPE}/space/{SPACE_KEY}/removeContentPermission
where {USER_NAME} is the user name
where {PERMISSION_TYPE} is the permission type (view or edit)
where {SPACE_KEY} is the space key
Request format: JSON
Example request: Content name as an array
1
2
3
4
5
{
"contents":[
"Page one", "Page two"
]
}
Response format: JSON
Example response:
1
2
3
4
5
6
7
8
{
"total": 0,
"removed": [],
"skipped": [
"Page one"
],
"status": "done"
}
Remove all content permission
Remove all content permission associated with a given user.
Available only for Confluence Administrator
Method type: DELETE
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/user/{USER_NAME}/removeAllContentPermission
where {USER_NAME} is the user name
Response format: JSON
Example response:
1
2
3
{
"status": "done"
}
Groups
Get inherited content permission by content id
Returns full inherited permissions to the level of a specific content (full tree with space permissions)
Available only for Confluence Administrator
Method type: GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_ID}/group/{GROUP_NAME}/getInheritedContentPermission
where {GROUP_NAME} is the group name
where {CONTENT_ID} is the content id
Request format: JSON
Example request: Content name as an array
1
2
3
4
5
{
"contents":[
"Page one", "Page two"
]
}
Parameters:
showContentDetails - adds extra space and content information such as key, name, etc.
Response format: JSON
Example response:
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
{
"contentId": 819212,
"hasContentViewPermission": false,
"hasContentEditPermission": false,
"hasSpaceEditPermission": true,
"hasSpaceViewPermission": true,
"contentTree": [
{
"level": 1,
"hasContentEditPermission": true,
"contentId": 819204,
"hasContentViewPermission": true
},
{
"level": 2,
"hasContentEditPermission": true,
"contentId": 819206,
"hasContentViewPermission": true
},
{
"level": 3,
"hasContentEditPermission": false,
"contentId": 819208,
"hasContentViewPermission": false
},
{
"level": 4,
"hasContentEditPermission": false,
"contentId": 819210,
"hasContentViewPermission": false
},
{
"level": 5,
"hasContentEditPermission": false,
"contentId": 819212,
"hasContentViewPermission": false
}
]
}
Get inherited content permission by content name
Returns full inherited permissions to the level of a specific content (full tree with space permissions)
Available only for Confluence Administrator
Method type: GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_NAME}/group/{GROUP_NAME}/space/{SPACE_KEY}/getInheritedContentPermission
where {GROUP_NAME} is the group name
where {SPACE_KEY} is the space key
where {CONTENT_NAME} is the content name
Parameters:
showContentDetails - adds extra space and content information such as key, name, etc.
Response format: JSON
Example response:
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
{
"contentId": 819212,
"hasContentViewPermission": false,
"hasContentEditPermission": false,
"hasSpaceEditPermission": true,
"hasSpaceViewPermission": true,
"contentTree": [
{
"level": 1,
"hasContentEditPermission": true,
"contentId": 819204,
"hasContentViewPermission": true
},
{
"level": 2,
"hasContentEditPermission": true,
"contentId": 819206,
"hasContentViewPermission": true
},
{
"level": 3,
"hasContentEditPermission": false,
"contentId": 819208,
"hasContentViewPermission": false
},
{
"level": 4,
"hasContentEditPermission": false,
"contentId": 819210,
"hasContentViewPermission": false
},
{
"level": 5,
"hasContentEditPermission": false,
"contentId": 819212,
"hasContentViewPermission": false
}
]
}
Get content permission by content id
Returns information whether the content contains group permissions without taking inheritance and space permissions
Available only for Confluence Administrator
Method type: GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_ID}/group/{GROUP_NAME}/getContentPermission
where {GROUP_NAME} is the group name
where {CONTENT_ID} is the content id
Parameters:
showContentDetails - adds extra space and content information such as key, name, etc.
Response format: JSON
Example response:
1
2
3
4
5
{
"contentId": 819212,
"hasContentViewPermission": false,
"hasContentEditPermission": false,
}
Get content permission by content name
Returns information whether the content contains group permissions without taking inheritance and space permissions
Available only for Confluence Administrator
Method type: GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_NAME}/group/{GROUP_NAME}/space/{SPACE_KEY}/getContentPermission
where {GROUP_NAME} is the group name
where {SPACE_KEY} is the space key
where {CONTENT_NAME} is the content name
Parameters:
showContentDetails - adds extra space and content information such as key, name, etc.
Response format: JSON
Example response:
1
2
3
4
5
{
"contentId": 819212,
"hasContentViewPermission": false,
"hasContentEditPermission": true
}
Add content permission by content id
Available only for Confluence Administrator
Method type: PUT
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/group/{GROUP_NAME}/permission/{PERMISSION_TYPE}/addContentPermission
where {GROUP_NAME} is the group name
where {PERMISSION_TYPE} is the permission type (view or edit)
Request format: JSON
Example request: Content id as an array
1
2
3
4
5
{
"contents":[
1111111, 2222222, 1234567
]
}
Response format: JSON
Example response:
1
2
3
4
5
6
7
8
{
"total": 1,
"added": [
819206
],
"skipped": [],
"status": "done"
}
Add content permission by content name
Available only for Confluence Administrator
Method type: PUT
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/group/{GROUP_NAME}/permission/{PERMISSION_TYPE}/space/{SPACE_KEY}/addContentPermission
where {GROUP_NAME} is the group name
where {PERMISSION_TYPE} is the permission type (view or edit)
where {SPACE_KEY} is the space key
Request format: JSON
Example request: Content name as an array
1
2
3
4
5
{
"contents":[
"Page one", "Page two"
]
}
Response format: JSON
Example response:
1
2
3
4
5
6
7
8
{
"total": 0,
"added": [],
"skipped": [
"Page two"
],
"status": "done"
}
Remove content permission by content id
Available only for Confluence Administrator
Method type: DELETE
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/group/{GROUP_NAME}/permission/{PERMISSION_TYPE}/removeContentPermission
where {GROUP_NAME} is the group name
where {PERMISSION_TYPE} is the permission type (view or edit)
Request format: JSON
Example request: Content id as an array
1
2
3
4
5
{
"contents":[
1111111, 2222222, 3333333
]
}
Response format: JSON
Example response:
1
2
3
4
5
6
7
8
9
10
{
"total": 2,
"removed": [
2222222, 3333333
],
"skipped": [
1111111
],
"status": "done"
}
Remove content permission by content name
Available only for Confluence Administrator
Method type: DELETE
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/group/{GROUP_NAME}/permission/{PERMISSION_TYPE}/space/{SPACE_KEY}/removeContentPermission
where {GROUP_NAME} is the group name
where {PERMISSION_TYPE} is the permission type (view or edit)
where {SPACE_KEY} is the space key
Request format: JSON
Example request: Content name as an array
1
2
3
4
5
{
"contents":[
"Page one", "Page two"
]
}
Response format: JSON
Example response:
1
2
3
4
5
6
7
8
{
"total": 0,
"removed": [],
"skipped": [
"Page one"
],
"status": "done"
}
Remove all content permission
Remove all content permission associated with a given group.
Available only for Confluence Administrator
Method type: DELETE
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/group/{GROUP_NAME}/removeAllContentPermission
where {GROUP_NAME} is the group name
Response format: JSON
Example response:
1
2
3
{
"status": "done"
}