PUT answer/…

Submits the answer to a question, and receives the evaluation of the answer.

Resource URL

https://www.drillster.com/api/2/answer/{reference}

Parameters

Field Description
reference
required
Unique identifier of the answered question. The reference must be copied from the 2.0 Question object received in the 2.0 QuestionResponse.
answer
optional, repeatable
The value of the selected (multiple choice) or entered (open-ended) answer. For multiple choice questions, this value must be copied from the question.tell.terms.value in the question response. For open-ended questions, this value is the text that the user has entered.

If multiple answers must be submitted (for SET or SEQUENCE compositions), the answer parameter can be submitted multiple times.

It is allowed to omit the answer parameter altogether, which is interpreted as an incorrect answer. This could for instance be used for a "reveal answer" option.

The content type for the HTTP PUT request must be application/x-www-form-urlencoded.

Response

An 2.0 AnswerResponse object.

Example request

PUT https://www.drillster.com/api/2/answer/pepKDyrLR760Dk7XqxODrw
answer=Vietnam

Response

{
  "notifications": [ ],
  "proficiency": {
    "receptive": 9,
    "productive": 10,
    "overall": 9
  },
  "evaluation": {
    "result": "INCORRECT",
    "termEvaluations": [ {
       "value": "Vietnam",
       "result": "INCORRECT"
    }, {
       "value": "Libya",
       "result": "MISSED"
    } ]
  }
}

Error responses

The following error situations are possible:

ID Response code Description
invalid_request 400 (Bad request) The request was invalid or the reference was missing.
reference_not_found 404 (Not found) The given question reference was not found. This could mean that the answer was already processed.
no_access 403 (Forbidden) The caller does not have access to the given question reference.
internal_error 500 (Internal error) Something bad happened.