GET test-result/…

Retrieves an individual test result for a specific test instance.

Test results can be stored at group level, or as individual results.

Resource URL

https://www.drillster.com/api/2.1/test-result/{test_id}

or

https://www.drillster.com/api/2.1/test-result/{test_id}/{user_id}

or

https://www.drillster.com/api/2.1/test-result/{test_id}/{ticket}

or

https://www.drillster.com/api/2.1/test-result/{test_id}/{pin}

Parameters

Field Type Description
test_id
required
String The ID of the test definition. This defines the test itself, not the individual instances done by users.

Example value: 7OuHq7RcQOCsnGWR58TnBw
user_id
optional
String The user ID of the user to retrieve test details for. If omitted, the details for the own user account are returned.

Example value: j7Yvq-ynQeWNnHTNWRV9wA
ticket
optional
String A ticket number issued by Drillster for use with anonymous tests.

Example value: jK8TJ11kcA7YvqUhd873kJ
pin
optional
String A PIN issued by Drillster for use with anonymous tests. Test results can only be requested with a PIN if the test is not finished yet. This is typically used to exchange the test PIN for a ticket for an anonymous test.

Example value: 0528919

💡 Good to know

Either a user ID or a test ticket can be used, not both!

Response

A 2.1 TestResult object, with details about the test itself, the achieved score, and the individual given answers and corrections.

Example request

GET https://www.drillster.com/api/2.1/test-result/HmOZ3fMbRxulVH77XYR8nQ/GNiyJoCtRTyQmmy-P9xlfA

Response

{
  "userId": "QMzpkEyivVvEvcM3Kopy3zCRTwA",
  "subject": "Japanese",
  "style": "MULTIPLE_CHOICE",
  "score": 0,
  "started": "2013-09-10T14:56:07Z",
  "completed": "2013-09-10T14:56:12Z",
  "size": 4,
  "correctlyAnswered": 0,
  "progress": 1.0,
  "includedColumnNames": [ "Hiragana" ],
  "drills": [ {
    "drill": {
      "id": "rCiRiK6gzUupEAmP2RAE1g",
      "name": "Hiragana",
      "subject": "Japanese",
      "type": "DRILL"
    },
    "score": 0
  } ],
  "questions": [ {
    "answered": true,
    "correct": false,
    "questionColumn": "Hiragana",
    "question": "ゃ",
    "answerColumn": "Rōmaji",
    "givenAnswers": [ "ya" ],
    "correctAnswers": [ "wo" ]
  }, {
    "answered": true,
    "correct": false,
    "questionColumn": "Hiragana",
    "question": "え",
    "answerColumn": "Rōmaji",
    "givenAnswers": [ "ho" ],
    "correctAnswers": [ "e" ]
  }, {
    "answered": true,
    "correct": false,
    "questionColumn": "Rōmaji",
    "question": "so",
    "answerColumn": "Hiragana",
    "givenAnswers": [ "ぜ" ],
    "correctAnswers": [ "そ" ]
  }, {
    "answered": true,
    "correct": false,
    "questionColumn": "Rōmaji",
    "question": "nu",
    "answerColumn": "Hiragana",
    "givenAnswers": [ "お" ],
    "correctAnswers": [ "ぬ" ]
  } ]
}

Error responses

The following error situations are possible:

ID Response code Description
missing_test_key 400 (Bad request) No test key given.
not_found 404 (Not found) The requested test result was not found.