GET test-question

GET Returns the next question for a predefined test.

Resource URL

https://www.drillster.com/api/2/test-question/{test_id}

The test ID is the unique identifier for a previously defined test.

Parameters

Field Type Description
test_id
required
String

The ID of the test definition.

Example value: oUcrG729TwKN2SsvrQpNww.

entryLevel
optional
Integer

For adaptive tests only. The entry level defines the level from which the first question(s) of this user's test are taken. If a non-default entry level must be used, it is required to specify this parameter when requesting the first test question. This parameter is ignored if it is specified for other questions.

Entry level 1 corresponds to the first (lowest difficulty) drill of the adaptive test, entry level 2 to the second, etc.

Response

A 2.0 QuestionResponse object.

Example request

GET https://www.drillster.com/api/2/test-question/oUcrG729TwKN2SsvrQpNww

Response

{
  "question" : {
    "reference" : "9J0D9O8NQ0CguRsOJXp1DA",
    "sequenceNr" : 1,
    "ask" : {
      "name" : "Country",
      "term" : {
        "value" : "Armenia"
      }
    },
    "tell" : {
      "name" : "Capital",
      "composition" : "SINGLE",
      "type" : "MULTIPLE_CHOICE",
      "terms" : [ {
        "value" : "Hanoi"
      }, {
        "value" : "Port Moresby"
      }, {
        "value" : "Copenhagen"
      }, {
        "value" : "Yerevan"
      } ]
    }
  }
}

Error responses

The following error situations are possible:

ID Description
missing_test_idNo test ID was given
missing_ticketNo ticket specified for anonymous test question
internal_errorAn error occurred while loading the test question
test_definition_not_foundThe requested test definition could not be found
invalid_ticketThe given ticket is not set up for the test definition
inaccessible_testThe test contains drills that are inaccessible to the user
already_completedThe test has already been completed by the user
invalid_requestYour request was invalid