Get Task

Overview

Get the status or the results of a listening task.

URI

/task/{taskId}

Parameters

You can use these parameters in your request.

Parameter Type Description
Authorization String Your access token should be included in the header of your request. If you need an accessToken, use Retrieve an Auth Token to generate it.

This needs to have the structure "Bearer {accessToken}"

taskId String The identification number that's associated with the measurement you want to see data for.

Response

These values may be returned in the response.

Parameter Type Description
taskStatus String The state of the task when the request was made. This can be:
  • QUEUED: The task hasn't completed.
  • SUCCESS: The task was completed successfully.
  • FAILED: We weren't able to complete the measurement. Make sure your files are configured correctly.
listeningMeasure Number Listening measurement.

Example: 400

listeningMeasureDisplay Number This is the measure you should use when you publish or share a listening measurement. The letters included with the measure indicate what type of measure this is.

In this example, the L means this is a Lexile measure. Example: 400L

apiVersion String The current version number for the API.

Additionally, these response codes may be returned.

Code Description Example
200 The call was successful.
{
    "taskStatus": "SUCCESS",
    "taskResult": {
        "listeningMeasure": 660,
        "listeningMeasureDisplay": "660L"
    },
    "taskId": "893b91e4-a039-4c29-96e0-9b99ad158db8",
    "apiVersion": "1.3.2"
}
200 The task has not finished processing at the time the request was made.
{
    "taskStatus": "QUEUED",
    "taskResult": null,
    "taskId": "893b91e4-a039-4c29-96e0-9b99ad158db8",
    "apiVersion": "1.3.2"
}
400 The request wasn't successful due to invalid input, a misspelled parameter, or a missing required parameter.
{
  "message": "Invalid input.",
  "exceptionType": "ValidationError",
  "additionalInfo": "Check validation errors for specifics.",
  "validationErrors": {
    "audioFile": [
      "Sample Depth of 8 bits is too low."
    ],
    "textFile": [
      "Text file must have a .txt extension and be UTF-8 encoded."
    ]
  }
}
401 We weren't able to authenticate your credentials. The access token is incorrect or missing
{
  "message": "Authentication with credentials failed",
  "exceptionType": "AuthenticationFailed",
  "additionalInfo": "Error decoding token"
}
403 You can't perform this action. doesn't have access to this feature.
{
  "message": "You do not have permission to perform this action.",
  "exceptionType": "PermissionDenied",
  "additionalInfo": "You don't have access to this resource."
}