Retrieves the available space roles.
Available on tenants with Role-Based Access Control.
Permissions required: Permission to access the Confluence site; if requesting a certain space's roles, permission to view the space.
read:space.permission:confluenceConnect app scope required: READ
string
string
string
PrincipalType
string
integer
Returned if the requested space roles are retrieved.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import { requestConfluence } from "@forge/bridge";
const response = await requestConfluence(`/wiki/api/v2/space-roles`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"results": [
{
"id": "<string>",
"type": "SYSTEM",
"name": "<string>",
"description": "<string>",
"spacePermissions": [
"<string>"
]
}
],
"_links": {
"next": "<string>",
"base": "<string>"
}
}Create a space role.
Available on tenants with Role-Based Access Control.
Permissions required: User must be an organization or site admin. Connect and Forge app users are not authorized to access this resource.
write:configuration:confluenceConnect app scope required: ADMIN
string
Requiredstring
Requiredarray<string>
RequiredReturned if the requested space role is created.
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 { requestConfluence } from "@forge/bridge";
var bodyData = `{
"name": "<string>",
"description": "<string>",
"spacePermissions": [
"<string>"
]
}`;
const response = await requestConfluence(`/wiki/api/v2/space-roles`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
4
5
6
7
8
9
{
"id": "<string>",
"type": "SYSTEM",
"name": "<string>",
"description": "<string>",
"spacePermissions": [
"<string>"
]
}Retrieves the space role by ID.
Available on tenants with Role-Based Access Control.
Permissions required: Permission to access the Confluence site.
read:space.permission:confluenceConnect app scope required: READ
integer
RequiredReturned if the requested space role is retrieved.
allOf [SpaceRole, object]
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import { requestConfluence } from "@forge/bridge";
const response = await requestConfluence(`/wiki/api/v2/space-roles/{id}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
4
5
6
7
8
9
10
11
12
{
"id": "<string>",
"type": "SYSTEM",
"name": "<string>",
"description": "<string>",
"spacePermissions": [
"<string>"
],
"_links": {
"base": "<string>"
}
}Update a space role.
Available on tenants with Role-Based Access Control.
Permissions required: User must be an organization or site admin. Connect and Forge app users are not authorized to access this resource.
write:configuration:confluenceConnect app scope required: ADMIN
string
Requiredstring
Requiredstring
Requiredarray<string>
Requiredstring
string
Returned if the update of the space role was accepted.
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
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import { requestConfluence } from "@forge/bridge";
var bodyData = `{
"name": "<string>",
"description": "<string>",
"spacePermissions": [
"<string>"
],
"anonymousReassignmentRoleId": "<string>",
"guestReassignmentRoleId": "<string>"
}`;
const response = await requestConfluence(`/wiki/api/v2/space-roles/{id}`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
4
5
6
7
{
"id": "<string>",
"type": "SYSTEM",
"name": "<string>",
"description": "<string>",
"taskId": "<string>"
}Delete a space role
Available on tenants with Role-Based Access Control.
Permissions required: User must be an organization or site admin. Connect and Forge app users are not authorized to access this resource.
write:configuration:confluenceConnect app scope required: ADMIN
string
RequiredReturned if the deletion of the space role was accepted.
1
2
3
4
5
6
7
8
9
10
11
12
13
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import { requestConfluence } from "@forge/bridge";
const response = await requestConfluence(`/wiki/api/v2/space-roles/{id}`, {
method: 'DELETE',
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
{
"taskId": "<string>"
}Retrieves the space role mode.
Available on tenants with Role-Based Access Control.
Permissions required: Permission to access the Confluence site ('Can use' global permission).
read:configuration:confluenceConnect app scope required: READ
This request has no parameters.
Returned if the requested space role mode is returned.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import { requestConfluence } from "@forge/bridge";
const response = await requestConfluence(`/wiki/api/v2/space-role-mode`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
{
"mode": "PRE_ROLES"
}Retrieves the space role assignments.
Available on tenants with Role-Based Access Control.
Permissions required: Permission to view the space.
read:space.permission:confluenceConnect app scope required: READ
integer
Requiredstring
string
string
PrincipalType
string
integer
Returned if the requested space role assignments are retrieved.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import { requestConfluence } from "@forge/bridge";
const response = await requestConfluence(`/wiki/api/v2/spaces/{id}/role-assignments`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"results": [
{
"principal": {
"principalType": "USER",
"principalId": "<string>"
},
"roleId": "<string>"
}
],
"_links": {
"next": "<string>",
"base": "<string>"
}
}Sets space role assignments as specified in the payload. For each entry, if roleId is provided
the principal is assigned to that role. If roleId is omitted, the role assignment for that principal is removed, if it exists.
Available on tenants with Role-Based Access Control.
Permissions required: Permission to manage roles in the space.
write:space.permission:confluenceConnect app scope required: SPACE_ADMIN
integer
Requiredarray<object>
Principal
Requiredstring
Returned if the requested update to space role assignments succeeds in its entirety.
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
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import { requestConfluence } from "@forge/bridge";
var bodyData = `[
{
"principal": {
"principalType": "USER",
"principalId": "<string>"
},
"roleId": "<string>"
}
]`;
const response = await requestConfluence(`/wiki/api/v2/spaces/{id}/role-assignments`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"results": [
{
"principal": {
"principalType": "USER",
"principalId": "<string>"
},
"roleId": "<string>"
}
],
"_links": {
"next": "<string>",
"base": "<string>"
}
}Rate this page: