Returns label information and a list of contents associated with the label.
Permissions required: Permission to access the Confluence site ('Can use' global permission). Only contents that the user is permitted to view is returned.
read:confluence-content.summary
read:label:confluence
, read:content:confluence
Connect app scope required: READ
string
Requiredstring
integer
integer
Returned if the query fetches zero or more results.
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/label?name={name}`, {
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
{
"label": {
"prefix": "<string>",
"name": "<string>",
"id": "<string>",
"label": "<string>"
},
"associatedContents": {
"results": [
{
"contentType": "page",
"contentId": 2154,
"title": "<string>"
}
],
"start": 2154,
"limit": 2154,
"size": 2154
}
}
Rate this page: