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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | A unique integer value identifying this course |
body | body | Course Section | true | The request body (course section params) |
Example Body Parameters
- JSON
{
"name": "string"
}
Example Request
- JavaScript
- Bash
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);
});
# You can also use wget
curl -X POST /api/v2/course/{id}/section/ \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
--DATA '{body}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Response status code | Course Section |