[ARCHIVED] Which API to read a student's Individual assignment grade?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried using /users/:userId/courses/:courseId/assignments
Assignments - Canvas LMS REST API Documentation
But it seems does not return grades for student's grade for individual assignment.
And then tried Canvas LMS REST API Documentation
GET /api/v1/courses/:course_id/analytics/users/:student_id/assignments
It seems we need analytics module, not sure how to enable it in open source version.
Also tried,
/api/graphql?per_page=100
with,
{
"query": "query MyQuery { assignment(id: 2) {
submissionsConnection(first: 100) {
nodes {
_id
user {
_id
name
}
}
pageInfo {
endCursor
}
}
}
}",
"variables": {}
}
My Question is,
Which Api end point should we be using to retrieve grades for individual assignment please?
What are the options available for me in API?
Appreciate any help/thoughts and suggestions.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use the Submissions API to get a student's grade on an assignment. There are different flavors available depending on whether you want all students for a single assignment, a single assignment for a single student, or multiple assignments or multiple students (you get to specify).
Note that the last I checked, concluded and inactive students are not included when you try to get grades for all students, you will need to include their user IDs specifically.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.