REST API - Content Permissions (Pages and Blog Posts)
- 1 General
- 2 Users
- 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
- 3 Groups
- 3.1 Get inherited content permission by content id
- 3.2 Get inherited content permission by content name
- 3.3 Get content permission by content id
- 3.4 Get content permission by content name
- 3.5 Add content permission by content id
- 3.6 Add content permission by content name
- 3.7 Remove content permission by content id
- 3.8 Remove content permission by content name
- 3.9 Remove all content permission
Available since v. 2.14.0
Added content permission REST APIs
Available since v. 3.3.*
Get full information about who can view/edit specific content
Get full information about content restrictions (as tree from space to specific content)
Available since v. 3.4.*
Added new parameter showSpaceAdministrators to below REST APIs:
Users: Get inherited content permission by content id, Get inherited content permission by content name
Groups - Get inherited content permission by content id, Get inherited content permission by content name
Available since v. 3.13.*
Added a new param “peopleWhoCanView” to the following REST APIs that allows you to show permissions exactly like the built-in "People who can view" function
Get full information who can view/edit specific content (as tree from space to specific content)
Get full information about content restrictions (as tree from space to specific content)
Available since v. 3.16.*
Below REST APIs are now available to space administrators:
Users: Get inherited content permission by content id, Get inherited content permission by content name, Get content permission by content id, Get content permission by content name, Add content permission by content name, Remove content permission by content name
Groups: Get inherited content permission by content id, Get inherited content permission by content name, Get content permission by content id, Get content permission by content name, Add content permission by content name, Remove content permission by content name
Available since v. 4.19.*
Added a new param “dateFormat” and date of last modification of permissions in content to the following REST APIs
General
Get full information about who can view/edit specific content
Available only for Confluence Administrators or Space Administrator
This API supports Pagination
This API supports optional parameters
The API returns a list of users and groups that have permissions that respect the hierarchy of permissions in the space (return information only for specific content)
If you want the complete information on the entire space tree up to this level of content, check out Get full information who can view/edit specific content (as tree from space to content level)
Method type: GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_ID}/getInheritedContentPermissions
where {CONTENT_ID} is the content id
Example URL:
{CONFLUENCE_URL}/rest/extender/1.0/permission/content/1234567/getInheritedContentPermissions
{CONFLUENCE_URL}/rest/extender/1.0/permission/content/1234567/getInheritedContentPermissions?showContentDetails=true
{CONFLUENCE_URL}/rest/extender/1.0/permission/content/1234567/getInheritedContentPermissions?startAt=50&maxResults=100
{CONFLUENCE_URL}/rest/extender/1.0/permission/content/1234567/getInheritedContentPermissions?permissionType=view
Parameters:
showContentDetails - adds extra space and content information such as key, name, etc.
permissionType - view, edit or empty - returns data only for a specific permission (leave empty for full information)
startAt & maxResults - by default, it shows the first 50 people/groups
peopleWhoCanView - show permissions exactly like the built-in "People who can view" function (the response will display all people with direct permissions and with permissions granted by groups; the groups themselves will not be included in the response)
dateFormat - define date format for parameters creationDateFrom, creationDateTo and for JSON output field lastPermissionModificationDateString - default format ‘yyyy-MM-dd'
Response format: JSON
Example response:
{
"spaceKey": "ds",
"spaceName": "Demonstration Space",
"level": 6,
"lastPermissionModificationDate": 1724425510813,
"lastPermissionModificationDateString": "2024-08-23 17:05:10",
"permissions": {
"view": {
"groups": [
"group_po",
"confluence-administrators",
"confluence-users"
],
"users": [
"user",
"admin"
]
},
"edit": {
"groups": [
"confluence-administrators",
"group_po",
"confluence-users"
],
"users": [
"admin",
"user"
]
},
"editGroupsTotal": 3,
"viewGroupsTotal": 3,
"viewUsersTotal": 2,
"editUsersTotal": 2
},
"contentId": 65564,
"contentType": "page",
"contentCreatorName": "not exist",
"contentName": "Get serious with a table (step 5 of 9)"
}
Get full information about who can view/edit specific content (as a tree from space to specific content)
Method type: GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_ID}/getInheritedContentTreePermissions
where {CONTENT_ID} is the content id
Example URL:
{CONFLUENCE_URL}/rest/extender/1.0/permission/content/1234567/getInheritedContentTreePermissions
{CONFLUENCE_URL}/rest/extender/1.0/permission/content/1234567/getInheritedContentTreePermissions?showContentDetails=true
{CONFLUENCE_URL}/rest/extender/1.0/permission/content/1234567/getInheritedContentTreePermissions?startAt=50&maxResults=100
{CONFLUENCE_URL}/rest/extender/1.0/permission/content/1234567/getInheritedContentTreePermissions?permissionType=view
Parameters:
showContentDetails - adds extra space and content information such as key, name, etc.
permissionType - view, edit or empty - returns data only for a specific permission (leave empty for full information)
startAt & maxResults - by default, it shows the first 50 people/groups
peopleWhoCanView - show permissions exactly like the built-in "People who can view" function (the response will display all people with direct permissions and with permissions granted by groups; the groups themselves will not be included in the response)
dateFormat - define date format for parameters creationDateFrom, creationDateTo and for JSON output field lastPermissionModificationDateString - default format ‘yyyy-MM-dd'
Response format: JSON
Example response:
{
"spaceKey": "ds",
"spaceName": "Demonstration Space",
"lastPermissionModificationDate": 1724425510813,
"lastPermissionModificationDateString": "2024-08-23 17:05:10",
"contentId": 65564,
"contentTree": [
{
"level": 1,
"permissions": {
"view": {
"groups": [
"confluence-administrators",
"group_po",
"confluence-users"
],
"users": [
"user",
"admin"
]
},
"edit": {
"groups": [
"group_po",
"confluence-administrators",
"confluence-users"
],
"users": [
"user",
"admin"
]
},
"edit