creating quiz responses
POST /v1/:school_id/current_user/responses
Parameters
| Name |
Description |
|
school_id
|
school_id
|
|
id
|
id
|
|
custom_form_id
|
custom_form_id
|
|
answers
|
answers
|
Request
Headers
Route
POST /v1/495/current_user/responses
Body
{"custom_form_id":6,"answers":{"answer-1":["Correct"]}}
cURL
curl "http://localhost:3000/v1/495/current_user/responses" -d '{"custom_form_id":6,"answers":{"answer-1":["Correct"]}}' -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Client-Token: mobile" \
-H "Sso-Token: zfntxkq6snbxru9UbeF-" \
-H "Host: api.worksonmy.computer"
Response
Headers
Status
200 OK
Body
{
"response": {
"id": 1,
"user_id": 1013,
"custom_form_id": 6,
"answers": {
"answer-1": [
"Correct"
]
},
"created_at": "2019-10-31T22:06:31Z",
"updated_at": "2019-10-31T22:06:31Z",
"school_id": 495,
"submitted_at": null,
"grade": {
"correct": 1,
"percent_correct": 1.0,
"answered": 1,
"percent_answered": 0.5,
"remaining": 1,
"total": 2
}
}
}