Design overview & sample calls

Assessments take time so the results need to be retrieved asynchronously in a separate API call after submission. Some sample calls are given below. A fuller set of examples and discussion of the structure of submissions can be found in Example Interaction. Availability of API calls can vary and assessment results can also vary depending on API clients' requirements (for example, whether CEFR levels or IELTS scores are required in text assessment results).

Submitting text for assessment

$ curl -H "Authorization: Token token=YOUR_TOKEN" -X PUT -H "Content-Type: application/json" -d '{
  "author_id": "learner1",
  "task_id": "task1",
  "session_id": "unique-session-id-for-this-user",
  "sequence_id": 0,
  "sequence_count": 1,
  "question_text": "Can you tell us about some famous people from your country?",
  "text": "There are many famos people from my country.  Where to begin? Im not shure."
}' https://api.englishlanguageitutoring.com/v2.1.0/account/YOUR_ACCOUNT_ID/text/test-id-1

# response
# {
#   "type": "success",
#   "code": 200
# }

Requesting results for text assessment

curl -H "Authorization: Token token=YOUR_TOKEN" https://api.englishlanguageitutoring.com/v2.1.0/account/YOUR_ACCOUNT_ID/text/test-id-1/results

# response
# {
#   "type": "results_not_ready",
#   "code": 200
# }
#
# or
#
# {
#  "type": "success",
#  "code": 200,
#  "overall_score": 2.64069,
#  "sentence_scores": [
#    [0, 44, -1],
#    [46, 61, -0.457825],
#    [62, 75, -1]
#  ],
#  "suspect_tokens": [],
#  "textual_errors": [
#    [15, 20, "famous", "S"],
#    [62, 64, "I'm", "MP"],
#    [69, 74, "sure", "S"]
#  ]
# }

results matching ""

    No results matching ""