Hello,
I'm trying to create a question to an existing quiz via API.
The doc is here: Quiz Questions - Canvas LMS REST API Documentation
So I made a simple data.json:
{
"question": {
"question_name": "Question",
"question_text": "test",
"question_type": "essay_question",
"points_possible": 1
}
}and send it to the canvas:
curl -s 'https://canvas.url/api/v1/courses/1571/quizzes/517/questions' -X POST -d @data.json -H "Authorization: Bearer $CANVAS_TOKEN" | jq -r '.'
But canvas ignored all my fields, and created a dummy question instead:
{
"id": 1446,
"quiz_id": 517,
"quiz_group_id": null,
"assessment_question_id": null,
"position": null,
"question_name": "Question",
"question_type": "text_only_question",
"question_text": "Question text",
"points_possible": 0,
"correct_comments": "",
"incorrect_comments": "",
"neutral_comments": "",
"correct_comments_html": "",
"incorrect_comments_html": "",
"neutral_comments_html": "",
"answers": [],
"variables": null,
"formulas": null,
"answer_tolerance": null,
"formula_decimal_places": null,
"matches": null,
"matching_answer_incorrect_matches": null,
"assessment_question": null
}Could it be the case of question API does not work?