REST API - Content Permissions (Pages and Blog Posts)

Available since v. 2.14.0

  • Added content permission REST APIs

Available since v. 3.3.*

Available since v. 3.4.*

Added new parameter showSpaceAdministrators to below REST APIs:

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

Available since v. 3.16.*

Below REST APIs are now available to space administrators:

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" ] }, "editGroupsTotal": 3, "viewGroupsTotal": 3, "viewUsersTotal": 2, "editUsersTotal": 2 }, "contentId": 65551, "contentType": "page", "contentCreatorName": "not exist", "contentName": "Welcome to Confluence", "lastPermissionModificationDate": "", "lastPermissionModificationDateString": "" }, { "level": 2, "permissions": { "view": { "groups": [ "group_po", "confluence-administrators", "confluence-users" ], "users": [ "admin", "user" ] }, "edit": { "groups": [ "confluence-administrators", "group_po", "confluence-users" ], "users": [ "admin", "user" ] }, "editGroupsTotal": 3, "viewGroupsTotal": 3, "viewUsersTotal": 2, "editUsersTotal": 2 }, "contentId": 65552, "contentType": "page", "contentCreatorName": "not exist", "contentName": "What is Confluence? (step 1 of 9)", "lastPermissionModificationDate": 1724425510813, "lastPermissionModificationDateString": "2024-08-23 17:05:10" }, { "level": 3, "permissions": { "view": { "groups": [ "confluence-users", "confluence-administrators", "group_po" ], "users": [ "user", "admin" ] }, "edit": { "groups": [ "group_po", "confluence-administrators", "confluence-users" ], "users": [ "user", "admin" ] }, "editGroupsTotal": 3, "viewGroupsTotal": 3, "viewUsersTotal": 2, "editUsersTotal": 2 }, "contentId": 65554, "contentType": "page", "contentCreatorName": "not exist", "contentName": "A quick look at the editor (step 2 of 9)", "lastPermissionModificationDate": 1724425510813, "lastPermissionModificationDateString": "2024-08-23 17:05:10" }, { "level": 4, "permissions": { "view": { "groups": [ "group_po", "confluence-administrators", "confluence-users" ], "users": [ "user", "admin" ] }, "edit": { "groups": [ "confluence-users", "group_po", "confluence-administrators" ], "users": [ "admin", "user" ] }, "editGroupsTotal": 3, "viewGroupsTotal": 3, "viewUsersTotal": 2, "editUsersTotal": 2 }, "contentId": 65549, "contentType": "page", "contentCreatorName": "not exist", "contentName": "Let's edit this page (step 3 of 9)", "lastPermissionModificationDate": "", "lastPermissionModificationDateString": "", }, { "level": 5, "permissions": { "view": { "groups": [ "confluence-users", "group_po", "confluence-administrators" ], "users": [ "user", "admin" ] }, "edit": { "groups": [ "confluence-users", "confluence-administrators", "group_po" ], "users": [ "user", "admin" ] }, "editGroupsTotal": 3, "viewGroupsTotal": 3, "viewUsersTotal": 2, "editUsersTotal": 2 }, "contentId": 65550, "contentType": "page", "contentCreatorName": "not exist", "contentName": "Prettify the page with an image (step 4 of 9)", "lastPermissionModificationDate": 1724425510813, "lastPermissionModificationDateString": "2024-08-23 17:05:10" }, { "level": 6, "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)", "lastPermissionModificationDate": 1724425510813, "lastPermissionModificationDateString": "2024-08-23 17:05:10" } ], "contentType": "page", "contentCreatorName": "not exist", "contentName": "Get serious with a table (step 5 of 9)" }

 


Get full information about content restrictions (as tree from space to specific content)

Method type: GET

URL: {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_ID}/getContentTreeRestrictions

  • where {CONTENT_ID} is the content id

Example URL:

  • {CONFLUENCE_URL}/rest/extender/1.0/permission/content/1234567/getContentTreeRestrictions

  • {CONFLUENCE_URL}/rest/extender/1.0/permission/content/1234567/getContentTreeRestrictions?showContentDetails=true

  • {CONFLUENCE_URL}/rest/extender/1.0/permission/content/1234567/getContentTreeRestrictions?startAt=50&maxResults=100

Parameters:

  • showContentDetails - adds extra space and content information such as key, name, etc.

  • 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", "contentId": 65564, "lastPermissionModificationDate": 1724425510813, "lastPermissionModificationDateString": "2024-08-23 17:05:10", "contentTree": [ { "level": 1, "contentId": 65551, "restrictions": { "editGroupsTotal": 0, "viewGroupsTotal": 0, "viewUsersTotal": 0, "editUsersTotal": 0 }, "contentType": "page", "contentCreatorName": "not exist", "contentName": "Welcome to Confluence", "lastPermissionModificationDate": "", "lastPermissionModificationDateString": "" }, { "level": 2, "contentId": 65552, "restrictions": { "view": { }, "edit": { "groups": [ "confluence-administrators", "confluence-users" ], "users": [ "admin" ] }, "everyone": "can view", "editGroupsTotal": 2, "viewGroupsTotal": 0, "viewUsersTotal": 0, "editUsersTotal": 1 }, "contentType": "page", "contentCreatorName": "not exist", "contentName": "What is Confluence? (step 1 of 9)", "lastPermissionModificationDate": "", "lastPermissionModificationDateString": "" }, { "level": 3, "contentId": 65554, "restrictions": { "editGroupsTotal": 0, "viewGroupsTotal": 0, "viewUsersTotal": 0, "editUsersTotal": 0 }, "contentType": "page", "contentCreatorName": "not exist", "contentName": "A quick look at the editor (step 2 of 9)", "lastPermissionModificationDate": "", "lastPermissionModificationDateString": "" }, { "level": 4, "contentId": 65549, "restrictions": { "view": { }, "edit": { "users": [ "admin" ] }, "everyone": "can view", "editGroupsTotal": 0, "viewGroupsTotal": 0, "viewUsersTotal": 0, "editUsersTotal": 1 }, "contentType": "page", "contentCreatorName": "not exist", "contentName": "Let's edit this page (step 3 of 9)", "lastPermissionModificationDate": "", "lastPermissionModificationDateString": "" }, { "level": 5, "contentId": 65550, "restrictions": { "editGroupsTotal": 0, "viewGroupsTotal": 0, "viewUsersTotal": 0, "editUsersTotal": 0 }, "contentType": "page", "contentCreatorName": "not exist", "contentName": "Prettify the page with an image (step 4 of 9)", "lastPermissionModificationDate": "", "lastPermissionModificationDateString": "" }, { "level": 6, "contentId": 65564, "restrictions": { "view": { "users": [ "admin", "user" ] }, "edit": { "users": [ "admin", "user" ] }, "everyone": "has no access", "editGroupsTotal": 0, "viewGroupsTotal": 0, "viewUsersTotal": 2, "editUsersTotal": 2 }, "contentType": "page", "contentCreatorName": "not exist", "contentName": "Get serious with a table (step 5 of 9)", "lastPermissionModificationDate": 1724425510813, "lastPermissionModificationDateString": "2024-08-23 17:05:10" } ], "contentType": "page", "contentCreatorName": "not exist", "contentName": "Get serious with a table (step 5 of 9)" }

 

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

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

Example URL:

  • {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_ID}/user/{USER_NAME}/getInheritedContentPermission?showContentDetails=true

  • {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_ID}/user/{USER_NAME}/getInheritedContentPermission?showContentDetails=true&showSpaceAdministrators=true

Parameters:

  • showContentDetails - adds extra space and content information such as key, name, etc.

  • showSpaceAdministrators - adds additional information to the response (spaceAdministrators), containing all space admins who have been granted administrative privileges either directly or through a group

Response format: JSON

Example response:

 

 

 


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

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

Example URL:

  • {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_NAME}/user/{USER_NAME}/space/{SPACE_KEY}/getInheritedContentPermission?showContentDetails=true

  • {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_NAME}/user/{USER_NAME}/space/{SPACE_KEY}/getInheritedContentPermission?showContentDetails=true&showSpaceAdministrators=true

Parameters:

  • showContentDetails - adds extra space and content information such as key, name, etc.

  • showSpaceAdministrators - adds additional information to the response (spaceAdministrators), containing all space admins who have been granted administrative privileges either directly or through a group

Response format: JSON

Example response:

 


Get content permission by content id

Returns information whether the content contains a personal permissions without taking inheritance and space permissions

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:

 


Get content permission by content name

Returns information whether the content contains a personal permissions without taking inheritance and space permissions

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:

 


Add content permission by content id

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

Response format: JSON

Example response:

 


Add content permission by content name

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

Response format: JSON

Example response:

 


Remove content permission by content id

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

Response format: JSON

Example response:

 


Remove content permission by content name

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

Response format: JSON

Example response:


Remove all content permission

Remove all content permission associated with a given user.

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:


 

Groups

Get inherited content permission by content id

Returns full inherited permissions to the level of a specific content (full tree with space permissions)

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

Example URL:

  • {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_ID}/group/{GROUP_NAME}/getInheritedContentPermission?showContentDetails=true

  • {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_ID}/group/{GROUP_NAME}/getInheritedContentPermission?showContentDetails=true&showSpaceAdministrators=true

Parameters:

  • showContentDetails - adds extra space and content information such as key, name, etc.

  • showSpaceAdministrators - adds additional information to the response (spaceAdministrators), containing all space admins who have been granted administrative privileges either directly or through a group

Response format: JSON

Example response:

 


Get inherited content permission by content name

Returns full inherited permissions to the level of a specific content (full tree with space permissions)

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

Example URL:

  • {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_NAME}/group/{GROUP_NAME}/space/{SPACE_KEY}/getInheritedContentPermission?showContentDetails=true

  • {CONFLUENCE_URL}/rest/extender/1.0/permission/content/{CONTENT_NAME}/group/{GROUP_NAME}/space/{SPACE_KEY}getInheritedContentPermission?showContentDetails=true&showSpaceAdministrators=true

Parameters:

  • showContentDetails - adds extra space and content information such as key, name, etc.

  • showSpaceAdministrators - adds additional information to the response (spaceAdministrators), containing all space admins who have been granted administrative privileges either directly or through a group

Response format: JSON

Example response:

 


Get content permission by content id

Returns information whether the content contains group permissions without taking inheritance and space permissions

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:

 


Get content permission by content name

Returns information whether the content contains group permissions without taking inheritance and space permissions

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:

 

 


Add content permission by content id

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

Response format: JSON

Example response:

 


Add content permission by content name

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

Response format: JSON

Example response:

 

 


Remove content permission by content id

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

Response format: JSON

Example response:

 


Remove content permission by content name

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

Response format: JSON

Example response:


Remove all content permission

Remove all content permission associated with a given group.

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: