Confluence cloud get content lastSeen for all active users

Hello,

I am trying to get content lastSeen for all active users. This works for current user:

/wiki/rest/api/content/8323164/child/page?expand=metadata.currentuser.viewed.lastSeen

How can I do the same for the rest of the users?

Thank You,
Jon.

Essentially, you can’t. The endpoint only returns information about the current user, and that’s all.

To get that same lastSeen information for other users, you will have to use the credentials of each of those users, one at a time, and get that information for each of them.

Thank You for quick answer Sunnyape. Alternatively is it possible to get cumulative count of all viewed pages for the space for the last 30 days?

I suggest you can do that research yourself.

For example, if you Google “Confluence REST API page view count” you’ll see where similar questions have been asked before and the closest answers provided… such as use the Analytics APIs. Those Analytics endpoints are not able to search all pages in a space in one request, so you’d have to iterate through all the pages to determine which ones had been viewed in the date range.

Have fun on your learning journey!

Thank You Sunnyape. Above link for Analytics APIs helped. It works.