Rate this page:
GET /wiki/rest/api/analytics/content/{contentId}/views
Get the total number of views a piece of content has.
Connect app scope required: READ
read:analytics.content:confluence
string
The ID of the content to get the views for.
string
The number of views for the content since the date.
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.asApp().requestConfluence(route`/wiki/rest/api/analytics/content/{contentId}/views`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Returns the total number of views for the content.
Content type | Value |
---|---|
application/json |
GET /wiki/rest/api/analytics/content/{contentId}/viewers
Get the total number of distinct viewers a piece of content has.
Connect app scope required: READ
read:analytics.content:confluence
string
The ID of the content to get the viewers for.
string
The number of views for the content since the date.
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.asApp().requestConfluence(route`/wiki/rest/api/analytics/content/{contentId}/viewers`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Returns the total number of distinct viewers for the content.
Content type | Value |
---|---|
application/json |
Rate this page: