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

Payload Format: Grading Multiple Submissions

I am attempting to automatically grade a certain assignment without submissions, and found that this can be achieved with the Submissions - Grading Multiple Submissions  request, using the command:

POST /api/v1/courses/:course_id/assignments/:assignment_id/submissions/update_grades

However,  I cannot seem to nail down the url for the payload. I currently have:

POST /api/v1/courses/:course_id/assignments/:assignment_id/submissions/update_grades/grade_data?grade_data\[<sis_user_id>\][posted_grade\]=6‍‍

Is this an incorrect request? 

Tags (1)
0 Kudos
2 Replies
Highlighted
Learner II

Hi Nikoli,

Unfortunately I do not know the answer to your question.  However, I did share it into the Canvas Developers group where people more familiar with the APIs tend to congregate.

0 Kudos
Highlighted
Navigator

hovor009@umn.edu,

Yes, it's incorrect formatted.

Why do you have backslashes around the brackets? 3 out of the 4 you have are escaped. There's no need to escape them in the URL, although you may URIencode them. The [ is %5B and ] is %5D. My experience has been that you do not need to URI encode those particular characters, but it's safe to do so.

Here's an example for a test student in a sandbox course that I just tried. I'm leaving the numbers in there just so you can see exactly what I typed. This needs the Canvas instance at the beginning, but I didn't want the Community software to make it a hyperlink and it distracts from the answer.

POST /api/v1/courses/896851/assignments/10638275/submissions/update_grades?grade_data[3346297][posted_grade]=2