Leave Course Or Remove Request
This endpoint allows users to leave the course identified by {id}
. If the user didn't joined the course but has
requested to join a course with private access then remove the request to join.
note
By passing the optional param user
a course manager is able to remove the user from the course.
info
This operation requires authentication. It requires also that the user is a manager of the course if the user
param is
passed.
HTTP Request
DELETE /api/v2/course/{id}/join/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer | true | A unique integer value identifying this course |
user | path | integer | false | A unique integer value identifying the user to remove from the course |
Example Request
- JavaScript
- Bash
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization: Bearer <token>'
};
fetch('/api/v2/course/{id}/subscribe/',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X DELETE /api/v2/course/{id}/subscribe/
-H "Authorization: Bearer <token>"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Response status code | None |