Analytics
API for retrieving the data exposed in Canvas Analytics
GET /api/v1/accounts/:account_id/analytics/terms/:term_id/activity
GET /api/v1/accounts/:account_id/analytics/terms/:term_id/activity
Scope: url:GET|/api/v1/accounts/:account_id/analytics/terms/:term_id/activity
GET /api/v1/accounts/:account_id/analytics/current/activity
GET /api/v1/accounts/:account_id/analytics/current/activity
Scope: url:GET|/api/v1/accounts/:account_id/analytics/current/activity
GET /api/v1/accounts/:account_id/analytics/completed/activity
GET /api/v1/accounts/:account_id/analytics/completed/activity
Scope: url:GET|/api/v1/accounts/:account_id/analytics/completed/activity
Returns page view hits summed across all courses in the department. Two groupings of these counts are returned; one by day (by_date
), the other by category (by_category
). The possible categories are announcements, assignments, collaborations, conferences, discussions, files, general, grades, groups, modules, other, pages, and quizzes.
This and the other department-level endpoints have three variations which all return the same style of data but for different subsets of courses. All share the prefix /api/v1/accounts/<account_id>/analytics. The possible suffixes are:
Courses not yet offered or which have been deleted are never included.
/current and /completed are intended for use when the account has only one term. /terms/<term_id> is intended for use when the account has multiple terms.
The action follows the suffix.
Example Request:
Example Response:
GET /api/v1/accounts/:account_id/analytics/terms/:term_id/grades
GET /api/v1/accounts/:account_id/analytics/terms/:term_id/grades
Scope: url:GET|/api/v1/accounts/:account_id/analytics/terms/:term_id/grades
GET /api/v1/accounts/:account_id/analytics/current/grades
GET /api/v1/accounts/:account_id/analytics/current/grades
Scope: url:GET|/api/v1/accounts/:account_id/analytics/current/grades
GET /api/v1/accounts/:account_id/analytics/completed/grades
GET /api/v1/accounts/:account_id/analytics/completed/grades
Scope: url:GET|/api/v1/accounts/:account_id/analytics/completed/grades
Returns the distribution of grades for students in courses in the department. Each data point is one student’s current grade in one course; if a student is in multiple courses, he contributes one value per course, but if he’s enrolled multiple times in the same course (e.g. a lecture section and a lab section), he only constributes on value for that course.
Grades are binned to the nearest integer score; anomalous grades outside the 0 to 100 range are ignored. The raw counts are returned, not yet normalized by the total count.
Shares the same variations on endpoint as the participation data.
Example Request:
Example Response:
GET /api/v1/accounts/:account_id/analytics/terms/:term_id/statistics
GET /api/v1/accounts/:account_id/analytics/terms/:term_id/statistics
Scope: url:GET|/api/v1/accounts/:account_id/analytics/terms/:term_id/statistics
GET /api/v1/accounts/:account_id/analytics/current/statistics
GET /api/v1/accounts/:account_id/analytics/current/statistics
Scope: url:GET|/api/v1/accounts/:account_id/analytics/current/statistics
GET /api/v1/accounts/:account_id/analytics/completed/statistics
GET /api/v1/accounts/:account_id/analytics/completed/statistics
Scope: url:GET|/api/v1/accounts/:account_id/analytics/completed/statistics
Returns numeric statistics about the department and term (or filter).
Shares the same variations on endpoint as the participation data.
Example Request:
Example Response:
GET /api/v1/accounts/:account_id/analytics/terms/:term_id/statistics_by_subaccount
GET /api/v1/accounts/:account_id/analytics/terms/:term_id/statistics_by_subaccount
Scope: url:GET|/api/v1/accounts/:account_id/analytics/terms/:term_id/statistics_by_subaccount
GET /api/v1/accounts/:account_id/analytics/current/statistics_by_subaccount
GET /api/v1/accounts/:account_id/analytics/current/statistics_by_subaccount
Scope: url:GET|/api/v1/accounts/:account_id/analytics/current/statistics_by_subaccount
GET /api/v1/accounts/:account_id/analytics/completed/statistics_by_subaccount
GET /api/v1/accounts/:account_id/analytics/completed/statistics_by_subaccount
Scope: url:GET|/api/v1/accounts/:account_id/analytics/completed/statistics_by_subaccount
Returns numeric statistics about the department subaccounts and term (or filter).
Shares the same variations on endpoint as the participation data.
Example Request:
Example Response:
GET /api/v1/courses/:course_id/analytics/activity
GET /api/v1/courses/:course_id/analytics/activity
Scope: url:GET|/api/v1/courses/:course_id/analytics/activity
Returns page view hits and participation numbers grouped by day through the entire history of the course. Page views is returned as a hash, where the hash keys are dates in the format “YYYY-MM-DD”. The page_views result set includes page views broken out by access category. Participations is returned as an array of dates in the format “YYYY-MM-DD”.
Example Request:
Example Response:
GET /api/v1/courses/:course_id/analytics/assignments
GET /api/v1/courses/:course_id/analytics/assignments
Scope: url:GET|/api/v1/courses/:course_id/analytics/assignments
Returns a list of assignments for the course sorted by due date. For each assignment returns basic assignment information, the grade breakdown, and a breakdown of on-time/late status of homework submissions.
Request Parameters:
Example Request:
Example Response:
GET /api/v1/courses/:course_id/analytics/student_summaries
GET /api/v1/courses/:course_id/analytics/student_summaries
Scope: url:GET|/api/v1/courses/:course_id/analytics/student_summaries
Returns a summary of per-user access information for all students in a course. This includes total page views, total participations, and a breakdown of on-time/late status for all homework submissions in the course.
Each student’s summary also includes the maximum number of page views and participations by any student in the course, which may be useful for some visualizations (since determining maximums client side can be tricky with pagination).
Request Parameters:
Example Request:
Example Response:
GET /api/v1/courses/:course_id/analytics/users/:student_id/activity
GET /api/v1/courses/:course_id/analytics/users/:student_id/activity
Scope: url:GET|/api/v1/courses/:course_id/analytics/users/:student_id/activity
Returns page view hits grouped by hour, and participation details through the entire history of the course.
‘page_views` are returned as a hash, where the keys are iso8601 dates, bucketed by the hour. `participations` are returned as an array of hashes, sorted oldest to newest.
Example Request:
Example Response:
GET /api/v1/courses/:course_id/analytics/users/:student_id/assignments
GET /api/v1/courses/:course_id/analytics/users/:student_id/assignments
Scope: url:GET|/api/v1/courses/:course_id/analytics/users/:student_id/assignments
Returns a list of assignments for the course sorted by due date. For each assignment returns basic assignment information, the grade breakdown (including the student’s actual grade), and the basic submission information for the student’s submission if it exists.
Example Request:
Example Response:
GET /api/v1/courses/:course_id/analytics/users/:student_id/communication
GET /api/v1/courses/:course_id/analytics/users/:student_id/communication
Scope: url:GET|/api/v1/courses/:course_id/analytics/users/:student_id/communication
Returns messaging “hits” grouped by day through the entire history of the course. Returns a hash containing the number of instructor-to-student messages, and student-to-instructor messages, where the hash keys are dates in the format “YYYY-MM-DD”. Message hits include Conversation messages and comments on homework submissions.
Example Request:
Example Response:
© Instructure, Inc. Generated on Wed Nov 6 14:20:05 2024 This documentation is generated directly from the Canvas LMS source code, available on Github.
Last updated