Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
I have been using the API to retrieve student quiz data and use it for offline data analysis. This has turned into a useful tool and I would like to develop it even further. For starters, I am currently trying to request a user's page views for my course to know when to give students nudges to login and look for assignments and general course content, if they have not been on Canvas for a while.
However, I am receiving an error 403: Forbidden. I even receive this error when I use my own user id for a course.
Therefore, my question is about whether the page_views API endpoint with authorization that can be enabled/disabled for certain users.
For example, I see that some API calls require admin status, such as missing_submissions.
But, for page_views, it does not say that the API calls requires admin status. So, I am wondering if there is a similar permissions issue here, or if I am having another problem.
Would anyone happen to know the answer to this? Or, perhaps any other suggestions?
Hi @geinitz,
I moved your question over to the developers area, where more API experts generally hang out.
With that being said, I'm 99.9% sure that almost everything in the users API area (unless you're trying to get specific info about your own user account) is restricted to admins only.
The analytics API can provide some general information, but it doesn't seem to have exact pages viewed or anything.
I wanted to at least give you this reply for now, but someone else who watches this group might be able to provide a way to do this for teachers. I know Canvas Data would provide a lot of this info, but even if your institution uses it, it's almost always restricted to admins (but your admins might be able to build a tool based on that data if it was something that would be useful for many teachers there).
-Chris
Thank you, Chris, for the quick and helpful reply. That makes sense about all user API area being more restricted.
It is a little odd though that I'm not able to retrieve the page_view data even for myself (with user id set to my own). But I suppose it's just that the user API calls are locked down for *all users.
I was able to use the analytics API to retrieve page views for any user though using activity. It seems to be more detailed that the Page View data shown when using the Canvas web interface for the class, but the two don't necessarily agree with each other which is another mystery. The analytics API activity also doesn't seem to be quite as detailed as what page_views returns. I suppose these are all questions for another post though. I'll leave this open for another day or two though in case someone else does have other ideas.
Thanks!
To participate in the Instructure Community, you need to sign up or log in:
Sign In