Hi all this is my POST request using Postman to create a quiz question.
https://canvas.instructure.com/api/v1/courses/2775624/quizzes/8044367/questions?"question_type"= "essay_question",&"question_name"= "QuestionOliverTest",
It works, but only creates a "text_only_question" not an essay question?
@OliverKharas
I don't use Postman, but that looks like a messed up request. There are extra quotes and commas that shouldn't be there. But since it's a POST and those parameters are not typically in the query string, I don't know if it's just the way you entered it here or the way it was entered in Postman.
What I'm seeing though is that basically none of your question came through and only the defaults are used.
To create a single quiz question, you need to wrap everything inside a question object.
It's question[question_type]=essay_question, not just question_type=essay_question.
One alternative is to wrap it in a JSON object and then be sure to include the content-type:application/json header. Depending on the language/library you're using, you may need to JSON.stringify that -- with the right settings, Postman can probably do that for you.
{ "question" : { "question_type" : "essay_question", "question_name" : "OliverTest" } }
I like the JSON style when programming because it's easier to work with objects than strings. I like it for illustration purposes because it's easier for people to see the structure.
Hello, I'm building a standalone app that integrate with CanvasI) - What are the requirements (and cost if any) for receiving an API developer key issued by Instructure? - Are Instructure-issued keys enabled globally in all Canvas organizations? or will there need to be institution-by-institution enablement? Thanks
Hi everyone, I am seeking some insight into how Canvas LMS handles HTTP errors and how they are reflected in the logs versus the user interface. We are currently observing the following behavior in our environment: Log-only errors: We are seeing 500 (Internal Server Error) and 503 (Service Unavailable) errors recorded in…
I'm currently integrating an LTI tool and attempting to use the Activity.id.history https://canvas.instructure.com/doc/api/file.tools_variable_substitutions.html#activity-id-history variable, but I'm experiencing issues getting it to work properly. What I've Done: Added the Activity.id.history variable to my Developer…
I looked through the LTI Variable Substitutions documentation and while there are variable substitutions available for Canvas.term.name and Canvas.term.id (which is the Canvas incremented ID like "104"), I was surprised to see there was no option for Canvas.term.sisSourceId I tried testing other possible variants that may…
Summary:The Learning Mastery Gradebook allows drag-and-drop reordering of outcome columns, and this triggers a call to /api/v1/courses/:course_id/assign_outcome_order. The API returns 204 No Content (success), but the column order does not persist after page refresh. Steps to Reproduce: Open Learning Mastery Gradebook for…