API GET all assignments for specific student. BULK endpoint

AndrewD1
Community Member

I am currently working on a dotnet wrapper for a professor. I need to be able to get every assignment and assignment grade for a INDIVIDUAL student.

Currently what I am doing is hitting

/courses/:courseID/assignments

to retrieve a list of all assignment IDS that exist for the class (This endpoint gives me the name of the assignment and the due_date / assignment ID).

Then I iterate over

/courses/:courseID/assignments/{assigmentID}/submissions/{userID}

 The issue I am having is that this leads to hundereds of endpoint calls to the api (I need the grade the student got on the assignment but that isn't included on the /courses/:courseID/assignments endpoint).

i.e if I want all the data for this student i would have to call

/courses/:courseID/assignments/1/submissions/12345

/courses/:courseID/assignments/2/submissions/12345

/courses/:courseID/assignments/3/submissions/12345

/courses/:courseID/assignments/4/submissions/12345

 

 

The professor needs student data for each assignment, such as the grade the student got and the name of the assignment. So I created a custom object to deserilize the response using these two endpoints combined.

 

Does anyone know of a way to get every assignment with the grade the student got on it? Or is this the only possible approach. I have found no way to retrieve every assignment with the grade the student got on it from a Canvas endpoint, or any URL filters I could use to make it easier. Anything to lower the endpoint calls down would be greatly appreciated.

Labels (2)
0 Likes