APIs in this section can change without any prior deprecation notice.
Moves a pagetree rooted at a page to the space's trash:
page
and its status is current
, it will be trashed including
all its descendants.This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously.
Response example:
1 2 3 4 5 6 7 8
{ "id" : "1180606", "links" : { "status" : "/rest/api/longtask/1180606" } }
Use the /longtask/<taskId>
REST API to get the copy task status.
Permissions required: 'Delete' permission for the space that the content is in.
write:confluence-content
delete:content:confluence
Connect app scope required: DELETE
string
RequiredReturned if the request to trash content and all its current page descendants, is successfully 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 api, { route } from "@forge/api";
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/content/{id}/pageTree`, {
method: 'DELETE',
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
{
"ari": "<string>",
"id": "<string>",
"links": {
"status": "<string>"
}
}
Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different types of labels.
read:confluence-space.summary
read:label:confluence
Connect app scope required: READ
string
Requiredstring
integer
integer
Returned if the list of labels 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 api, { route } from "@forge/api";
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/space/{spaceKey}/label`, {
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
{
"results": [
{
"prefix": "<string>",
"name": "<string>",
"id": "<string>",
"label": "<string>"
}
],
"start": 2154,
"limit": 2154,
"size": 2154,
"_links": {}
}
Adds labels to a piece of content. Does not modify the existing labels.
Notes:
Permissions required: Permission to update the content.
write:confluence-space
read:label:confluence
, write:label:confluence
Connect app scope required: WRITE
string
RequiredThe labels to add to the content.
array<LabelCreate>
string
Requiredstring
Requiredany
Returned if the labels are added to the content.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `[
{
"prefix": "<string>",
"name": "<string>"
}
]`;
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/space/{spaceKey}/label`, {
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
{
"results": [
{
"prefix": "<string>",
"name": "<string>",
"id": "<string>",
"label": "<string>"
}
],
"start": 2154,
"limit": 2154,
"size": 2154,
"_links": {}
}
write:confluence-space
write:label:confluence
Connect app scope required: WRITE
string
Requiredstring
Requiredstring
Returned if the label was successfully deleted.
1
2
3
4
5
6
7
8
9
10
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestConfluence(route`/wiki/rest/api/space/{spaceKey}/label?name={name}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Rate this page: