List All Automatic Speech Recognition (ASR) Annotation Sets API

This API lists all annotation sets for a given skill.

HTTP method and path

GET v1/skills/{skillId}/asrAnnotationSets?nextToken={nextToken}&maxResults={maxResults}
Field Type Description Required
skillId String Skill Id as part of the URI path. Yes
annotationSetID String Annotation set Id as part of the request URI path. Yes

Request

Request headers

Content-Type: application/json
Accept: application/json

Request body

None.

Response

HTTP status

HTTP 200 OK

Response headers

Content-Type: application/json

Response body

{
    "name": string,
    "annotationCount": integer,
    "lastUpdatedTimestamp": timestamp,
    "eligibleForEvaluation": boolean
}
Attributes Type Description Required
annotationSet[i].id String Annotation set Id Yes
annotationSet[i].name String Name of the annotation set. Yes
annotationSet[i].annotationCount Integer Number of annotations in the annotation set. Yes
annotationSet[i].lastUpdatedTimestamp String Last updated timestamp for this annotation set. Updating either metadata or content updates this timestamp (ISO-8601 format). Yes
annotationSet[i].eligibleForEvaluation Boolean Indicates if the annotation set is eligible for evaluation. A set is ineligible for evaluation if any annotation within the set has a missing uploadId, filePathInUpload, expectedTranscription, or expectedTranscription. Yes
paginationContext Object Object containing pagination information. If present, the response contains incomplete evaluation results. If omitted, all evaluation results were already returned. No.
paginationContext.nextToken String Use the value of nextToken in the next request as the continuation token to list the next set of objects. Yes

Error response

The following table lists call-specific errors. For a reference of errors that can apply to all ASR APIs, see Automatic Speech Recognition (ASR) API Error Reference.

HTTP Status Code Error Code Scenario

404 Not Found

RESOURCE_NOT_FOUND

Requested skill doesn't exist.

400 Bad Request

INVALID_REQUEST_PARAMETER

The nextToken query parameter is invalid.

INAVLID_INTEGER_VALUE

The value of maxResults query parameter is outside of the allowed range.

PARAMETER_EXPIRED

The nextToken query parameter expired.

500 Internal Server Error

INTERNAL_SERVER_ERROR

Request failed due to an internal server error.

Examples

Sample Request Sample Response
GET /v1/skills/1234/asrAnnotationSets HTTP/1.1 Accept: application/json HTTP 200 OK Content-Type: application/json { "annotationSets": [ { "id": "amzn1.ask-asr-evaluation.asid.1234-123-1234", "name": "my annotation set", "annotationCount": 10, "lastUpdatedTimestamp": "2019-08-12T18:46:31.674Z" }, { "id": "amzn1.ask-asr-evaluation.asid.1234-123-1235", "name": "my annotation set 2", "annotationCount": 5, "lastUpdatedTimestamp": "2019-08-12T18:46:31.674Z" }, { "id": "amzn1.ask-asr-evaluation.asid.1234-123-1236", "name": "my annotation set 3", "annotationCount": 5, "lastUpdatedTimestamp": "2019-08-12T18:46:31.674Z" }, ] }

GET /v1/skills/1234/asrAnnotationSets?maxResults=1 HTTP/1.1 Content-Type: application/json Accept: application/json
HTTP 200 OK Content-Type: application/json { "annotationSets": [ { "id": "amzn1.ask-asr-evaluation.asid.1234-123-1234", "name": "my annotation set 2", "annotationCount": 5, "lastUpdatedTimestamp": "2019-08-12T18:46:31.674Z" } ], "paginationContext": { "nextToken": "ABC123454" } }
GET /v1/skills/1234/asrAnnotationSets?nextToken=asdfbcd HTTP/1.1 Content-Type: application/json Accept: application/json
HTTP 400 Bad Request Content-Type: application/json { "message": "Query parameter validations failed", "violations": [{ "message": "Query parameter \"nextToken\" with value\"asdfbcd\" is expired", "code": "PARAMETER_EXPIRED" }] }