Audit
Analytics
Content
Content - attachments
Content body
Content - children and descendants
Content - macro body
Content comments
Content labels
Content permissions
Content properties
Content restrictions
Content versions
Content watches
Dynamic modules
Experimental
Group
Inline tasks
Label info
Long-running task
Relation
Search
Settings
Space
Space permissions
Space properties
Space settings
Template
Themes
Users

Rate this page:

Analytics

Get views

GET /wiki/rest/api/analytics/content/{contentId}/views

Get the total number of views a piece of content has.

Connect app scope requiredREAD

OAuth scopes requiredread:analytics.content:confluence
DEPRECATED OAuth scopesread:confluence-content.summary
Learn more about deprecated scopes

Request

Path parameters
contentId Required

string

The ID of the content to get the views for.

Query parameters
fromDate

string

The number of views for the content since the date.

Example

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());

Responses

Returns the total number of views for the content.

Content typeValue
application/json

object

Get viewers

GET /wiki/rest/api/analytics/content/{contentId}/viewers

Get the total number of distinct viewers a piece of content has.

Connect app scope requiredREAD

OAuth scopes requiredread:analytics.content:confluence
DEPRECATED OAuth scopesread:confluence-content.summary
Learn more about deprecated scopes

Request

Path parameters
contentId Required

string

The ID of the content to get the viewers for.

Query parameters
fromDate

string

The number of views for the content since the date.

Example

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());

Responses

Returns the total number of distinct viewers for the content.

Content typeValue
application/json

object

Rate this page: