returns status code 422
DELETE /api/v1/courses/:course_id/lecture_sections/:id
Parameters
| Name |
Description |
|
course_id
|
couse id
|
|
id
|
id
|
|
name
|
Lecture section Name
|
|
is_published
|
publically viewable?
|
Request
Headers
Route
DELETE /api/v1/courses/50/lecture_sections/51
Body
{"name":"foo","is_published":true}
cURL
curl "http://localhost:3000/api/v1/courses/50/lecture_sections/51" -d '{"name":"foo","is_published":true}' -X DELETE \
-H "Accept: application/json" \
-H "X-Api-Token: ViQ-zsXXqJerib4Rc93oN6_UzHTDgSKrHw" \
-H "X-Api-Email: user-138@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
422 Unprocessable Entity
Body
{
"errors": {
"lecture_section": [
"Lecture section Cannot destroy the only lecture section"
]
}
}