Skip to main content

Update Course

This endpoint updates a specific course.

info

This operation requires the course manager role.

HTTP Request

PUT /api/v2/course/{id}/

Parameters

NameInTypeRequiredDescription
idpathstringtrueA unique integer value identifying this course
bodybodyCoursetrueThe request body (course params)

Example Body Parameters

{
"name": "string",
"description": "string",
"type": "string",
"privacy": "string",
"image_original": "string",
"categories": [integer]
}

Example Request

const inputBody = '{
"name": "string",
"description": "string",
"type": "string",
"privacy": "string",
"image_original": "string",
"categories": [integer]
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/course/{id}/',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKResponse status codeCourse