Patch Course Comment
This endpoint patches 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.
note
You can use this endpoint to edit a single field passing only the id and the needed field (without mandatory fields).
HTTP Request
PATCH /api/v2/course/{course_id}/section/{section_id}/lesson/{lesson_id}/comment/{comment_id}/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
course_id | path | string | true | A unique integer value identifying the course of the comment |
section_id | path | string | true | A unique integer value identifying the section of the comment |
lesson_id | path | string | true | A unique integer value identifying the lesson of the comment |
comment_id | path | string | true | A unique integer value identifying the comment |
body | body | Course Comment | true | The request body (course comment params) |
Example Body Parameters
- JSON
{
"text": "string"
}
Example Request
- JavaScript
- Bash
const inputBody = '{
"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}/comment/{comment_id}/',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X PATCH /api/v2/course/{course_id}/section/{section_id}/lesson/{lesson_id}/comment/{comment_id}/ \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
--DATA '{body}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Response status code | Course Comment |