Skip to main content

Update Course Lesson

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

info

This operation requires the course manager role.

HTTP Request

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

Parameters

NameInTypeRequiredDescription
course_idpathstringtrueA unique integer value identifying the course of the lesson
section_idpathstringtrueA unique integer value identifying the section of the lesson
lesson_idpathstringtrueA unique integer value identifying the lesson
bodybodyCourse LessontrueThe request body (course lesson params)

Example Body Parameters

{
"name": "string",
"type": "string",
"text": "string"
}

Example Request

const inputBody = '{
"name": "string",
"type": "string",
"text": "string"
}';
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}/',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKResponse status codeCourse Lesson