Rate this page:
POST /wiki/rest/api/content/{id}/permission/check
Check if a user or a group can perform an operation to the specified content. The operation
to check
must be provided. The user’s account ID or the ID of the group can be provided in the subject
to check
permissions against a specified user or group. The following permission checks are done to make sure that the
user or group has the proper access:
Permissions required: Permission to access the Confluence site ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global permission is required.
Connect app scope required: READ
read:content.permission:confluence
string
The ID of the content to check permissions against.
This object represents the request for the content permission check API.
The user or group that the permission applies to.
string
The content permission operation to check.
Valid values: read
, update
, delete
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"subject": {
"type": "user",
"identifier": "<string>"
},
"operation": "read"
}`;
const response = await api.asApp().requestConfluence(route`/wiki/rest/api/content/{id}/permission/check`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Returned if the permission check completed successfully
Content type | Value |
---|---|
application/json |
Rate this page: