AnsweredAssumed Answered

The difference between page_views API and usage.json

Question asked by Hui Tsao on Feb 14, 2019
Latest reply on Jul 30, 2019 by James Jones
I am trying to calculate the view and participate count for each (course, tool, student) combination. I use page_views API (/api/v1/users/:user_id/page_views) to get the PageView objects back and process the objects to get the count for each (course, tool, and student). To check if my results are correct, I use the usage.json (/courses/:course_id/users/:user_id/usage.json) inside Canvas. However, I found that for the same (course, tool, student) combination, the number of views from these two APIs don't match. Some are off by one or two but some can be off by ten or more. Can anyone help me understand why? 
The usage.jon returns the accumulated view and participate counts. I would like to know if there is a canvas API that can get the same results. The closest canvas API that I can find is page_views, of which its results are always off. 

Outcomes