- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Page views api endpoint returns empty array for all users
I am trying to retrieve page view information from the canvas API.
For Example: {{domain}}/api/v1/users/1/page_views
This request returns a 200 status but the response is an empty array `[]`
Is there some sort of setting I must activate in order for canvas to start collecting page views? Or perhaps a plugin of some kind that needs to be installed?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you sure that user 1 has any page views? Try viewing the page views for your account.
The token you're using should be good or you would be getting an authorized error, not an empty response. The same thing would happen if there was no user 1. However, if user 1 has never logged in and viewed pages, then it would be empty. I verified this behavior with a user that has never logged in on our site.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
User #1 is an account one that I have access to. I know that this user has signed on and viewed several different views in canvas, courses, pages, assignments, etc. Additionally my script loops through every user ID in my subaccount ID and checks for page_views. They all result in an empty array as response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does this mean that you are running your own instance of Canvas as opposed to a hosted version? I don't have any experience there, so someone else will have to help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes the instance I am working with is self-hosted on AWS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there anyone that can help? I am still waiting on a solution to why it would return empty array.
