- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024
11:47 AM
The enrollments API is probably what you're looking for. It includes each enrollment as well as a student's current grade and final grade as calculated by Canvas. Here's what I get by doing a GET request to /api/v1/courses/123/enrollments:
[
{
"id": ...,
"user_id": ...,
"course_id": ...,
"type": "StudentEnrollment",
"created_at": ...,
"updated_at": ...,
"associated_user_id": null,
"start_at": null,
"end_at": null,
"course_section_id": ...,
"root_account_id": 1,
"limit_privileges_to_course_section": false,
"enrollment_state": "active",
"role": "StudentEnrollment",
"role_id": 3,
"last_activity_at": ...,
"last_attended_at": null,
"total_activity_time": ...,
"sis_import_id": ...,
"grades": {
"html_url": ...,
"current_grade": "B+",
"current_score": 88.6,
"final_grade": "B+",
"final_score": 88.6,
"unposted_current_score": 88.6,
"unposted_current_grade": "B+",
"unposted_final_score": 88.6,
"unposted_final_grade": "B+"
},
"sis_account_id": ...,
"sis_course_id": ...,
"course_integration_id": null,
"sis_section_id": ...,
"section_integration_id": null,
"sis_user_id": ...,
"html_url": ...,
"user": {
"id": ...,
"name": ...,
"created_at": ...,
"sortable_name": ...,
"short_name": ...,
"sis_user_id": ...,
"integration_id": ...,
"sis_import_id": ...,
"login_id": ...
}
}
]
You can also add ?include[]=current_points to the end to get the raw points value of the student's enrollment.
You'd probably want to use the unposted_current_score for your report since it's the percentage that the instructor sees in the gradebook and would be the most likely value they'd use when entering grades into SIS manually (if that's relevant to you).
Enrollments API: https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.index