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