Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
Info

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 flag “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:


General

Get full information who can view/edit specific content

Available only for Confluence Administrators or Space Administrator

This API supports Pagination

This API supports optional parameters

Info

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: 

Status
colourGreen
titleGET

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

  • where {CONTENT_ID} is the space keycontent 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)

Response format: JSON

Example response:

Code Block
breakoutModewide
languageactionscript3
{
	"spaceKey": "ds",
	"spaceName": "Demonstration Space",
	"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)"
}


Get full information who can view/edit specific content (as tree from space to specific content)

Available only for Confluence Administrators or Space Administrator

This API supports Pagination

This API supports optional parameters

Info

The API returns a list of users and groups that have permissions that respect the hierarchy of permissions in the space (from space to specific content)

Method type: 

Status
colourGreen
titleGET

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

  • where {CONTENT_ID} is the space keycontent 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)

Response format: JSON

Example response:

Code Block
breakoutModewide
languageactionscript3
{
	"spaceKey": "ds",
	"spaceName": "Demonstration Space",
	"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"
		},
		{
			"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)"
		},
		{
			"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)"
		},
		{
			"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)"
		},
		{
			"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)"
		},
		{
			"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)"
		}
	],
	"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)

Available only for Confluence Administrators or Space Administrator

This API supports Pagination

This API supports optional parameters

Info

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: 

Status
colourGreen
titleGET

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

  • where {CONTENT_ID} is the space keycontent 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)

Response format: JSON

Example response:

Code Block
breakoutModewide
languageactionscript3
{
	"spaceKey": "ds",
	"spaceName": "Demonstration Space",
	"contentId": 65564,
	"contentTree": [
		{
			"level": 1,
			"contentId": 65551,
			"restrictions": {
				"editGroupsTotal": 0,
				"viewGroupsTotal": 0,
				"viewUsersTotal": 0,
				"editUsersTotal": 0
			},
			"contentType": "page",
			"contentCreatorName": "not exist",
			"contentName": "Welcome to Confluence"
		},
		{
			"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)"
		},
		{
			"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)"
		},
		{
			"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)"
		},
		{
			"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)"
		},
		{
			"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)"
		}
	],
	"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

Available only for Confluence Administrators or Space Administrator

Method type: 

Status
colourGreen
titleGET

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:

Code Block
languageactionscript3
{
    "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
        }
    ],
    "spaceAdministrators": [
		"adam.nowak",
		"space.admin"
	]
}

Code Block
languageactionscript3
{
    "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"
        }
    ],
    "spaceAdministrators": [
		"adam.nowak",
		"space.admin"
	]
}


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 Administrators or Space Administrator

Method type: 

Status
colourGreen
titleGET

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:

Code Block
breakoutModewide
languageactionscript3
{
    "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
        }
    ],
    "spaceAdministrators": [
		"adam.nowak",
		"space.admin"
	]
}


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 Administrators or Space Administrator

Method type: 

Status
colourGreen
titleGET

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:

Code Block
breakoutModewide
languageactionscript3
{
    "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 Administrators or Space Administrator

Method type: 

Status
colourGreen
titleGET

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:

Code Block
breakoutModewide
languageactionscript3
{
    "contentId": 819212, 
    "hasContentViewPermission": false,
    "hasContentEditPermission": false
}


Add content permission by content id

Available only for Confluence Administrator

Method type: 

Status
colourYellow
titlePUT

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

Code Block
breakoutModewide
languagejs
{
	"contents":[
		1111111, 2222222, 1234567
	]
}

Response format: JSON

Example response:

Code Block
breakoutModewide
languageactionscript3
{
    "total": 1,
    "added": [
        819206
    ],
    "skipped": [],
    "status": "done"
}


Add content permission by content name

Available only for Confluence Administrators or Space Administrator

Method type: 

Status
colourYellow
titlePUT

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

Code Block
breakoutModewide
languagejs
{
	"contents":[
		"Page one", "Page two"
	]
}

Response format: JSON

Example response:

Code Block
breakoutModewide
languageactionscript3
{
    "total": 0,
    "added": [],
    "skipped": [
      "Page two"
    ],
    "status": "done"
}


Remove content permission by content id

Available only for Confluence Administrator

Method type: 

Status
colourRed
titleDELETE

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

Code Block
breakoutModewide
languagejs
{
	"contents":[
		1111111, 2222222, 3333333
	]
}

Response format: JSON

Example response:

Code Block
breakoutModewide
languageactionscript3
{
    "total": 2,
    "removed": [
      2222222, 3333333
    ],
    "skipped": [
      1111111
    ],
    "status": "done"
}


Remove content permission by content name

Available only for Confluence Administrators or Space Administrator

Method type: 

Status
colourRed
titleDELETE

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

Code Block
breakoutModewide
languagejs
{
	"contents":[
		"Page one", "Page two"
	]
}

Response format: JSON

Example response:

Code Block
breakoutModewide
languageactionscript3
{
    "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: 

Status
colourRed
titleDELETE

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:

Code Block
breakoutModewide
languageactionscript3
{
    "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 Administrators or Space Administrator

Method type: 

Status
colourGreen
titleGET

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:

Code Block
breakoutModewide
languageactionscript3
{
    "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
        }
    ],
    "spaceAdministrators": [
		"adam.nowak",
		"space.admin"
	]
}


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 Administrators or Space Administrator

Method type: 

Status
colourGreen
titleGET

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:

Code Block
breakoutModewide
languageactionscript3
{
    "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
        }
    ],
    "spaceAdministrators": [
		"adam.nowak",
		"space.admin"
	]
}


Get content permission by content id

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

Available only for Confluence Administrators or Space Administrator

Method type: 

Status
colourGreen
titleGET

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:

Code Block
breakoutModewide
languageactionscript3
{
    "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 Administrators or Space Administrator

Method type: 

Status
colourGreen
titleGET

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:

Code Block
breakoutModewide
languageactionscript3
{
    "contentId": 819212, 
    "hasContentViewPermission": false,
    "hasContentEditPermission": true
}


Add content permission by content id

Available only for Confluence Administrator

Method type: 

Status
colourYellow
titlePUT

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

Code Block
breakoutModewide
{
	"contents":[
		1111111, 2222222, 1234567
	]
}

Response format: JSON

Example response:

Code Block
breakoutModewide
languageactionscript3
{
    "total": 1,
    "added": [
        819206
    ],
    "skipped": [],
    "status": "done"
}


Add content permission by content name

Available only for Confluence Administrators or Space Administrator

Method type: 

Status
colourYellow
titlePUT

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

Code Block
breakoutModewide
{
	"contents":[
		"Page one", "Page two"
	]
}

Response format: JSON

Example response:

Code Block
breakoutModewide
languageactionscript3
{
    "total": 0,
    "added": [],
    "skipped": [
      "Page two"
    ],
    "status": "done"
}


Remove content permission by content id

Available only for Confluence Administrators

Method type: 

Status
colourRed
titleDELETE

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

Code Block
breakoutModewide
{
	"contents":[
		1111111, 2222222, 3333333
	]
}

Response format: JSON

Example response:

Code Block
breakoutModewide
languageactionscript3
{
    "total": 2,
    "removed": [
      2222222, 3333333
    ],
    "skipped": [
      1111111
    ],
    "status": "done"
}


Remove content permission by content name

Available only for Confluence Administrators or Space Administrator

Method type: 

Status
colourRed
titleDELETE

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

Code Block
breakoutModewide
{
	"contents":[
		"Page one", "Page two"
	]
}

Response format: JSON

Example response:

Code Block
breakoutModewide
languageactionscript3
{
    "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: 

Status
colourRed
titleDELETE

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:

Code Block
breakoutModewide
languageactionscript3
{
    "status": "done"
}