Skip to main content

Create a Course Section

This endpoint creates a section for the course identified by {id}.

info

This operation requires the course manager role.

HTTP Request

POST /api/v2/course/{id}/section/

Parameters

NameInTypeRequiredDescription
idpathstringtrueA unique integer value identifying this course
bodybodyCourse SectiontrueThe request body (course section params)

Example Body Parameters

{
"name": "string"
}

Example Request

const inputBody = '{
"name": "string"
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

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

Responses

StatusMeaningDescriptionSchema
201CreatedResponse status codeCourse Section