Returns all spaces. The results will be sorted by id ascending. The number of results is limited by the limit parameter and
additional results (if available) will be available through the next URL present in the Link response header.
Permissions required: Permission to access the Confluence site ('Can use' global permission). Only spaces that the user has permission to view will be returned.
read:space:confluenceConnect app scope required: READ
array<integer>
array<string>
string
string
array<string>
string
string
SpaceSortOrder
SpaceDescriptionBodyRepresentation
boolean
Returned if the requested spaces are returned.
string
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`, {
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
18
19
20
21
22
23
24
25
26
27
28
29
30
{
"results": [
{
"id": "<string>",
"key": "<string>",
"name": "<string>",
"type": "global",
"status": "current",
"authorId": "<string>",
"currentActiveAlias": "<string>",
"createdAt": "<string>",
"homepageId": "<string>",
"description": {
"plain": {},
"view": {}
},
"icon": {
"path": "<string>",
"apiDownloadLink": "<string>"
},
"_links": {
"webui": "<string>"
}
}
],
"_links": {
"next": "<string>",
"base": "<string>"
}
}Creates a Space as specified in the payload.
Available as part of the Role-Based Access Controls Beta.
Permissions required: Permission to create spaces.
write:space:confluenceConnect app scope required: WRITE
string
Requiredstring
string
object
array<object>
integer
boolean
string
Returned if the requested space is created.
allOf [SpaceBulk, object]
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
26
27
28
29
30
31
32
33
34
35
36
37
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import { requestConfluence } from "@forge/bridge";
var bodyData = `{
"name": "<string>",
"key": "<string>",
"alias": "<string>",
"description": {
"value": "<string>",
"representation": "<string>"
},
"roleAssignments": [
{
"principal": {
"principalType": "USER",
"principalId": "<string>"
},
"roleId": "<string>"
}
],
"copySpaceAccessConfiguration": 64,
"createPrivateSpace": true,
"templateKey": "<string>"
}`;
const response = await requestConfluence(`/wiki/api/v2/spaces`, {
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
16
17
18
19
20
21
22
{
"id": "<string>",
"key": "<string>",
"name": "<string>",
"type": "global",
"status": "current",
"authorId": "<string>",
"currentActiveAlias": "<string>",
"createdAt": "<string>",
"homepageId": "<string>",
"description": {
"plain": {},
"view": {}
},
"icon": {
"path": "<string>",
"apiDownloadLink": "<string>"
},
"_links": {
"base": "<string>"
}
}Returns a specific space.
Permissions required: Permission to view the space.
read:space:confluenceConnect app scope required: READ
integer
RequiredSpaceDescriptionBodyRepresentation
boolean
boolean
boolean
boolean
boolean
boolean
Returned if the requested space is returned.
allOf [SpaceSingle, 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/spaces/{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
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
"id": "<string>",
"key": "<string>",
"name": "<string>",
"type": "global",
"status": "current",
"authorId": "<string>",
"createdAt": "<string>",
"homepageId": "<string>",
"description": {
"plain": {},
"view": {}
},
"icon": {
"path": "<string>",
"apiDownloadLink": "<string>"
},
"labels": {
"results": [
{
"id": "<string>",
"name": "<string>",
"prefix": "<string>"
}
],
"meta": {
"hasMore": true,
"cursor": "<string>"
},
"_links": {
"self": "<string>"
}
},
"properties": {
"results": [
{
"id": "<string>",
"key": "<string>",
"createdAt": "<string>",
"createdBy": "<string>",
"version": {
"createdAt": "<string>",
"createdBy": "<string>",
"message": "<string>",
"number": 44
}
}
],
"meta": {
"hasMore": true,
"cursor": "<string>"
},
"_links": {
"self": "<string>"
}
},
"operations": {
"results": [
{
"operation": "<string>",
"targetType": "<string>"
}
],
"meta": {
"hasMore": true,
"cursor": "<string>"
},
"_links": {
"self": "<string>"
}
},
"permissions": {
"results": [
{
"id": "<string>",
"principal": {
"type": "user",
"id": "<string>"
},
"operation": {
"key": "use",
"targetType": "page"
}
}
],
"meta": {
"hasMore": true,
"cursor": "<string>"
},
"_links": {
"self": "<string>"
}
},
"_links": {
"base": "<string>"
}
}Rate this page: