cancel
Showing results for 
Search instead for 
Did you mean: 
czehner1
Community Member

Dedicated Grades API

Jump to solution

Hello all!

 

I am somewhat new to the Canvas APIs and am working to get a little additional information from the grades via the enrollment API.

I am aware of the API to get a users final/current grades via (https://{domain}/api/v1/courses/{courseID}/users/{userID}?include[]=enrollments), but this does not give me all the information that I need, such as when the grades were submitted, or who posted them (if there are multiple instructors in a course.)

I notice that there is a html url within the enrollments API that does not seem to be accessible via the API: (https://{domain}/api/v1/courses/{courseID}/grades/{userID}) Is there something similar to this through the APIs or is this potentially something that can be accessed through the API?

 

Thank you,

Cody Zehner

Kent State Educational Technology Support

Labels (1)
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
James
Community Champion

Cody ( @czehner1 ),

The Submissions API contains the grade details. Use the Get a single submission or List submissions for multiple assignments (or students) endpoints. There is a graded_at and grader_id that should be able to help.

Since the URL in your second question contains /api/v1/, it is accessible through the API. It just may not be documented.

View solution in original post

4 Replies
James
Community Champion

Cody ( @czehner1 ),

The Submissions API contains the grade details. Use the Get a single submission or List submissions for multiple assignments (or students) endpoints. There is a graded_at and grader_id that should be able to help.

Since the URL in your second question contains /api/v1/, it is accessible through the API. It just may not be documented.

View solution in original post

czehner1
Community Member

Hi James,

 

Thank you for your response! I think the one I am looking at is https://{domain}/api/v1/courses/{courseID}/students/submissions which should contain all the necessary information according to the documentation. Unfortunately, I get an 'unathorized' error upon accessing that API. The API token that I am using through a user profile is set to Account Admin, which has every permission enabled for them. Is there another higher permission level that has this ability, or am I authenticating the wrong way?

James
Community Champion

Cody ( @czehner1 )

The authorization should be the same. Send the Authorization header with the token with the request.

I use that API endpoint regularly. You cannot call it without specifying some information in the query string.

If you try it without specifying student_ids[], it's going to use the calling user, which is the admin because of the token you're using, and the admin does not have any submissions in the course. You get a 401 Unauthorized status. I can't get anything without specifying student_ids[] as a teacher, either.

czehner1
Community Member

Thank you James! Worked perfectly!