is creatable
POST /api/v1/courses/:course_id/course_questions/
Parameters
| Name |
Description |
|
id
|
id
|
|
course_id
|
id of the course
|
|
question
|
A question
|
|
answer
|
An answer
|
Request
Headers
Route
POST /api/v1/courses/194/course_questions/
Body
{"id":10,"question":"question","answer":"answer"}
cURL
curl "http://localhost:3000/api/v1/courses/194/course_questions/" -d '{"id":10,"question":"question","answer":"answer"}' -X POST \
-H "Accept: application/json" \
-H "X-Api-Token: tWp5HTBosfUYBKXWRVssgcuFWzJ9u6zbpA" \
-H "X-Api-Email: user-356@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
201 Created
Body
{
"created_at": "2019-10-31T22:04:01Z",
"question": "question",
"answer": "answer",
"course_id": 194,
"position": 2,
"is_published": true,
"id": 11,
"meta": {
"class": "coursequestion",
"url": "/courses/194/course_questions/11",
"name": "11",
"description": "",
"image_url": null
}
}