Skip to main content

Delete a Course Comment

This endpoint deletes a specific comment with id {comment_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 manager role or that the comment was created by the current user.

HTTP Request

DELETE /api/v2/course/{course_id}/section/{section_id}/lesson/{lesson_id}/comment/{comment_id}/

Parameters

NameInTypeRequiredDescription
course_idpathstringtrueA unique integer value identifying the course of the comment
section_idpathstringtrueA unique integer value identifying the section of the comment
lesson_idpathstringtrueA unique integer value identifying the lesson of the comment
comment_idpathstringtrueA unique integer value identifying the comment

Example Request

const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization: Bearer <token>'
};
fetch('/api/v2/course/{course_id}/section/{section_id}/lesson/{lesson_id}/comment/{comment_id}/',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});


Responses

StatusMeaningDescriptionSchema
204No ContentResponse status codeNone