cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mmallon
Community Member

API call to answer a quiz question not working

Just about every API call that I need to make a quizzing app is working, except for the one to answer questions. I'm using the following API call: Canvas LMS REST API Documentation

My first question is: which ID should I use for the submission and for the quiz questions that I am submitting? In the QuizSubmission object, there is both an id and a submission_id. In the QuizQuestion object, there is both an id and assessment_question_id. The API documentation does not explicitly specify which of these myriad IDs to use. Which ID should I use for submissions and which ID should I use for quiz questions?

Beyond that, I have tried every permutation of quiz/submission ID possible and am still getting an error back from the API. I get an error_report_id in the response, but I see no documentation anywhere about how to access an error report. I was able to find a related thread on the google forums (Google Groups ), but the route for /error_reports/id that was specified there results in an error saying that I don't have permissions to access the page. Even the highest-level admin for our Canvas instance runs into the same permissions error. Does anyone know of a way to see the error reports?

Depending on which permutation of quiz/submission ID that I send to the API, the error that I get is either "The specified resource does not exist" or "internal_server_error." Neither of which is very helpful for solving my problem. Considering that this is the only API call that I've had to make so far with a nested array (for the question IDs and answers), that might be the issue (or a red herring...). I'm using PHP and cURL for my API calls, and using http_build_query() for my post parameters, which theoretically should be able to handle the nested arrays without a problem. I'm pretty stumped on what the issue might be.

Thoughts? Thank you!

Labels (1)
Tags (1)
0 Kudos
1 Reply
stuart_ryan
Community Coach
Community Coach

Hi mmallon,

I am going through having a look at some of the early days in the Canvas Developers group, and checking in to see if older enquiries have been answered. I also noticed there hasn’t been any discussion on this question.

I am wondering, were you ever able to resolve this? I am hoping I can assume that it is well and truly resolved by now, but if not, please let us know and we can certainly have another look. Alternatively, if have some insights you may be able to share for others that would be awesome too!

I will mark this as assumed answered for the time being, however, by all means please let us know if you still have an outstanding question and we will take a peek!

Cheers,
Stuart