Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,046
Community Members
 
Community Events
176
Community Groups

How to the view count of a page in confluence using Rest Api?

I want to get the details of how many views of my page using Rest Api, is this possible?

1 answer

1 accepted

2 votes
Answer accepted
Darryl Lee Community Leader Nov 15, 2021

Huh, it looks like there is an API for analytics, even for the Free plan (I just tested on my free test site): Confluence Analytics APIs 

These are the two endpoints available:

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

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

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

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

-----

Because my first search found this, I'll in include this info about paid options: 

This bug (CONFCLOUD-67453 ) notes that there is not an API for the Analytics for Confluence Cloud feature that is  available for Premium and Enterprise Plans:

Lastly, there are two paid add-ons for Confluence Cloud, one of which advertises that raw data can be exported via a REST API:

The other add-on does not mention any API access:

@Darryl LeeDoes this work for both Confluence Cloud and Confluence Server?  Are there even separate APIs for Cloud vs Server? Thanks!

Darryl Lee Community Leader Dec 13, 2022

Hi @Brandon Valley --

It looks like Analytics, including Page Views were added to Confluence Data Center (not Server) in version 7.11.

(This was I assume a result of the acquisition of Good Software, who made a popular Analytics add-on for Confluence.)

This is not available in Confluence Server.

Furthermore, I do not see any information about this data being available in the official Confluence (On-Prem) REST API documentation.

Interestingly, I found this a bug about some undocumented Analytics APIs: CONFSERVER-76071 

And this KB article includes some possible full paths you might poke around with:

I tried this on our Server instance:

https://OURSERVER/rest/confanalytics/1.0/instance/paginated/activityBySpace

And got:

{
"error": {
"reason": "InvalidAddonLicense",
"message": "Add-on license is not valid."
}
}

Which makes sense, since we had never purchased the Good add-on.

I think many (frugal) users have long relied on Old Street Software's free Page View Tracker, which does not have an API that I am aware of, but does offer a CSV export and some SQL queries that you could run as well.

Hello @BAVITHRA R  and @Brandon Valle 

Our app Viewtracker - Analytics for Confluence is available for all hosting types and plans and comes with an API (on-premise / cloud).

Best regards

Mattia

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events