Get the total number of views a piece of content has.
read:confluence-content.summaryread:analytics.content:confluenceConnect app scope required: READ
string
Requiredstring
Returns the total number of views for the content.
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/rest/api/analytics/content/{contentId}/views`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
4
{
"id": 15,
"count": 42
}Get the total number of distinct viewers a piece of content has.
read:confluence-content.summaryread:analytics.content:confluenceConnect app scope required: READ
string
Requiredstring
Returns the total number of distinct viewers for the content.
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/rest/api/analytics/content/{contentId}/viewers`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
4
{
"id": 15,
"count": 53
}Rate this page: