The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
Hi:
I'm trying to develop my own quiz speed grader using the API.
I'd like to pull down all of the answers to a particular open response (essay) quiz question and then grade them all on one page using a custom UI and send the scores back in for each student.
I'm having trouble finding the part of the API that let's me pull down a student's answer to a particular quiz question and then update the score for that question. I saw one thread that suggested I needed to use some kind of report (with a download URL) but I'm really hoping that's not the case. That also wouldn't help me change the score for a particular question. I saw a place to change the fudge score but that's for the overall quiz (I think).
This seems so fundamental I can't believe it's not possible but I just can't figure it out.
Thanks,
Sam
Solved! Go to Solution.
OK! Hi Deactivated user, @Renee_Carney and @James :
Big thanks to wfrakes from Instructure for sending me a correct JSON string that works. Here is the deal for other users who run into trouble here:
Here is the CORRECT FORMAT (the documentation is WRONG and/or misleading)
{
"quiz_submissions": [{
"attempt": 3,
"fudge_points": 1,
"questions": {
"10959": {
"score": 2.5,
"comment": "test."
},
"10960": {
"score": 1,
"comment": "test."
}
}
}]
}
Note , the red value is the id number of the quiz question. I got confused because the API documentation is problematic. Here are the examples from the docs:
{
"quiz_submissions": [{
"attempt": 1,
"fudge_points": -2.4,
"questions": {
"1": { <========= These look like an array index of the questions in the quiz, not a six+ digit ID number
"score": 2.5,
"comment": "This can't be right, but I'll let it pass this one time."
},
"2": { <========= see?
"score": 0,
"comment": "Good thinking. Almost!"
}
}
}]
}
Three examples from the manual scoring appendix
The following come from the Appendix on manual scoring...
FIRST
{
"quiz_submissions": [{
"fudge_points": null, // null for no change, or a signed decimal
"questions": {
"QUESTION_ID": { <============ This HAS the question ID but it fails because.... can you see it?... no attempt number
"score": null, // null for no change, or an unsigned decimal
"comment": null // null for no change, '' for no comment, or a string
}
}
}]
}
SECOND
{
"quiz_submissions": [{
"attempt": 1, <========================= This HAS the attempt number but fails because no questions (it works WITH questions)
"fudge_points": -2.4
}]
}
THIRD
{
"quiz_submissions": [{
"attempt": 1,
"questions": {
"1": { <============= We're back to single digit ID numbers
"comment": ""
}
}
}]
}
I hope Instructure fixes up the docs AND please note that the Live! API tool is still broken for this call.
Regards,
Sam Dickerman
Brookline High School
This is super unfortunate. My TAs have been disappointed with the Instructure provided grading tools, so I was like "oohhhh, there's a REST API!, I'll just whip up a new one in a few hours, here." But then the REST API didn't seem to be working right. Instead of documenting the fact that the API doesn't work on the API page, Instructure forces me to go all around the world looking for this thread, which clarifies that not only can Instructure not make a functional website, they can't even make a functional REST API. This level of incompetence is truly astounding.
I found this after digging around a while but I can't get it to work:
It says you can add this:
{
|
But I keep getting an error when using the REST LIVE! API too:
{ "status": "bad_request", "message": "missing required key :quiz_submissions", "error_report_id": 151189100 }
I can't figure out what the missing key is!
Thanks for any help!!
Here's the three examples from from this area of the API docs:
Aren't these different? Why does the top one NOT have "Attempt" in it but the other two do?
Parameter synopsis
{
|
Fudging the score by a negative amount
{
|
Removing an earlier comment on a question
{
|
BUT then the live API tool has this (see screenshot below)
Which has "attempt" and "fudge_points" as separate form fields from "questions"...
So confused!
OK - I just found this thread and I'm worried...
@Renee_Carney
Aug 13, 2015 10:49 AM
The Product Manager for Quizzes has confirmed that this API will not be completed and was pulled out of BETA some time ago (before he came on board). The documentation will be updated to remove the mention of the API resource.
Our apologies that this caused confusion and frustration for you. We do appreciate you bringing this to our attention and giving us an opportunity to spare others confusion and frustration.
Does this mean the ENTIRE quiz API will not be completed? I'd love some clarification...
Thanks
Thank you for the question @sam_dickerman
The comment was strictly around the request for - not about the quiz API as a whole.
Hello @sam_dickerman and @Renee_Carney
This is a very innovative use of the API. The current API remains in a beta stage as we are actively considering some new development on the quizzes front. For now there will not be any further development of the current API. We will share more in the near future as things progress.
Kind regards,
Jason
Hi Jason - thanks for the reply.
Could you please clarify if updating the score of a given student's answer through the API is supported? I can't quite reconcile the docs and the live API tool.
A working curl example would be so helpful!
Thanks,
Sam
***Bump***
While Deactivated user did state the current status of the API, he didn't actually answer the question...
Is it possible to update a user's score on a particular quiz question using the current API?
@Renee_Carney - thanks for your work moderating the community. Can you see if an engineer can take a look at this?
Thanks!
Sam
Hello Sam,
My apologies. Please try this API:
Kind regards,
Jason
On Mon, Sep 28, 2015 at 11:08 AM, sam_dickerman@brookline.k12.ma.us <
Hi Deactivated user and @Renee_Carney :
Actually I think I was the one who was unclear...
What I meant to ask was if it was possible to get the answers a student has given for a set of questions, decide how to score them, and then add the scores back to Canvas - all through the API.
It now appears that one cannot get the answers the student has made on a quiz because the API is not working. This thread by @James seems to explain all this quite well.
Can someone from Instructure confirm that it is not possible to get a student's answers, look at them, score them, and then put the scores back into Canvas via the API (not including the csv report method which does not look too fun).
Thanks,
Sam
I just unchecked Deactivated user' answer as the correct answer. I hope that's OK!
I'm just hoping for a little more clarity around the issues in my last post.
Also - while I'm here... on reflection it does seem a bit weird that there isn't a Category of API calls for Quiz Answers. So you could GET a particular answer to a particular question by a particular student (or by all students I suppose). You could then PUT a score for that answer. That the scores and comments go into a hash that is part (in theory) of the Quiz Submission category is something one doesn't see in the rest of the API.
I know the API is marked as BETA (5+ years of beta) but I don't think it would require a huge amount of time and energy to fix this (if indeed it is broken). The main application can perform this function so presumably the API just needs to leverage this existing functionality.
Looking forward to your reply,
Sam
Hi Jason Sparks and Renee Carney:
Just checking in - this is really the crux of the issue so I'm looking for some support here. A tech support rep just sent me the link to the same API docs (that don't seem to work). This is becoming like a sort of surreal, existentialist story where I keep asking for help and keep getting sent back to the same source (which doesn't help).
I would really appreciate some clarity here.
Thanks,
Sam
I'm sorry you feel like you are spinning in circles a little bit. I empathize with you there. I do not have an answer for this, but we will continue to seek someone who does. Thank you for your patience with us.
Thanks for your kind reply. I really appreciate your efforts.
Sam
On Tue, Oct 6, 2015 at 7:14 PM, Renee Carney <instructure@jiveon.com>
Sam,
I've been ill for several days. I apologize for the delay. I want to be sure you have looked at these APIs...
Is this not what you need?
Jason
Hi Deactivated user and @Renee_Carney :
Glad you are feeling better Jason! Unfortunately, this does not answer my question. Ironically my last post before yours (except to say thanks to Renee) reads:
This is becoming like a sort of surreal, existentialist story where I keep asking for help and keep getting sent back to the same source (which doesn't help).
So a link to the quiz API docs does not solve my problem...
In summary - I am asking for someone from Instructure to address the issue that the API as documented DOES NOT WORK.
On July 15th of this summer, @James wrote in the this thread that:
it can't be done through the API because the quiz submissions API is broken
I am having the same experience. I cannot get the quiz API to respond per the instructions in the documents.
I would like to retrieve student responses to essay style questions via the API and return scores for those questions but I cannot. The reasons could be:
A) The API is broken
B) The documentation is incorrect about the API
C) I don't understand what I'm doing (quite possible)
IF the API is working can someone PLEASE send an example of working code.
If the API is broken please confirm (and, actually) can someone please fix it.
Thanks,
Sam Dickerman
Brookline High School
OK! Hi Deactivated user, @Renee_Carney and @James :
Big thanks to wfrakes from Instructure for sending me a correct JSON string that works. Here is the deal for other users who run into trouble here:
Here is the CORRECT FORMAT (the documentation is WRONG and/or misleading)
{
"quiz_submissions": [{
"attempt": 3,
"fudge_points": 1,
"questions": {
"10959": {
"score": 2.5,
"comment": "test."
},
"10960": {
"score": 1,
"comment": "test."
}
}
}]
}
Note , the red value is the id number of the quiz question. I got confused because the API documentation is problematic. Here are the examples from the docs:
{
"quiz_submissions": [{
"attempt": 1,
"fudge_points": -2.4,
"questions": {
"1": { <========= These look like an array index of the questions in the quiz, not a six+ digit ID number
"score": 2.5,
"comment": "This can't be right, but I'll let it pass this one time."
},
"2": { <========= see?
"score": 0,
"comment": "Good thinking. Almost!"
}
}
}]
}
Three examples from the manual scoring appendix
The following come from the Appendix on manual scoring...
FIRST
{
"quiz_submissions": [{
"fudge_points": null, // null for no change, or a signed decimal
"questions": {
"QUESTION_ID": { <============ This HAS the question ID but it fails because.... can you see it?... no attempt number
"score": null, // null for no change, or an unsigned decimal
"comment": null // null for no change, '' for no comment, or a string
}
}
}]
}
SECOND
{
"quiz_submissions": [{
"attempt": 1, <========================= This HAS the attempt number but fails because no questions (it works WITH questions)
"fudge_points": -2.4
}]
}
THIRD
{
"quiz_submissions": [{
"attempt": 1,
"questions": {
"1": { <============= We're back to single digit ID numbers
"comment": ""
}
}
}]
}
I hope Instructure fixes up the docs AND please note that the Live! API tool is still broken for this call.
Regards,
Sam Dickerman
Brookline High School
@Renee_Carney - Hi Renee, our folks recently ran into the above issue with the Quiz Submissions API, and are saying the documentation there is still out of date (as it was in this post). How do we get the API documentation updated?
It's been four years since I pointed out that they never finished the quiz API properly. Clearly they never will.
Two years ago they said they would have a REST API for the new quizzes tool (which was to be finished 20 months ago) but I wouldn't hold your breath. I've given up on any meaningful progress from Instructure. Sad really.
This is super unfortunate. My TAs have been disappointed with the Instructure provided grading tools, so I was like "oohhhh, there's a REST API!, I'll just whip up a new one in a few hours, here." But then the REST API didn't seem to be working right. Instead of documenting the fact that the API doesn't work on the API page, Instructure forces me to go all around the world looking for this thread, which clarifies that not only can Instructure not make a functional website, they can't even make a functional REST API. This level of incompetence is truly astounding.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in