Skip to main content

Update Course Quiz Question

This endpoint updates a specific question with id {question_id} for the course identified by {course_id}, under the section identified by {section_id} and written in the lesson identified by {lesson_id}.

info

This operation requires the course creator or manager role.

HTTP Request

PUT /api/v2/course/{course_id}/section/{section_id}/lesson/{lesson_id}/question/{question_id}/

Parameters

NameInTypeRequiredDescription
course_idpathstringtrueA unique integer value identifying the course of the question
section_idpathstringtrueA unique integer value identifying the section of the question
lesson_idpathstringtrueA unique integer value identifying the lesson of the question
question_idpathstringtrueA unique integer value identifying the question
bodybodyCourse Quiz QuestiontrueThe request body (course question params)

Example Body Parameters

{
"type": "string",
"text": "string",
"answers": []
}

Example Request

const inputBody = '{
"type": "string",
"text": "string",
"answers": []
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/course/{course_id}/section/{section_id}/lesson/{lesson_id}/question/{question_id}/',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKResponse status codeCourse Quiz Question