Update an Annotation Set Property for Automatic Speech Recognition (ASR) API
Call this API to update the name of an existing annotation set to be used in an ASR Evaluation.
HTTP method and path
PUT v1/skills/{skillId}/asrAnnotationSets/{annotationSetId} HTTP/1.1
Field | Type | Description | Required |
---|---|---|---|
skillId |
String | Skill Id as part of the URI path. | Yes |
annotationSetId |
String | Annotation Id as part of the URI path. | Yes |
Request
Request Headers
Content-Type: application/json
Accept: application/json
Request Body
{
"name": string
}
Attributes | Type | Description | Required |
---|---|---|---|
name | String | Name of the annotation set. The length of the name cannot exceed 170 chars. | Yes |
Response
HTTP Status
HTTP 204 No Content
Response Headers
None.
Response Body
None.
Error Response
This section 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 |
---|---|---|
400 Bad Request |
MISSING_REQUIRED_PROPERTY |
Required fields are missing in the request payload |
CONTENT_PARSE_FAILURE |
Request payload is malformed |
|
INVALID_STRING_LENGTH |
Length of name field is not within allowed range |
|
INVALID_REQUEST_PARAMETER |
Name field contains invalid characters. |
|
404 Not Found |
RESOURCE_NOT_FOUND |
Requested skill does not exist |
500 Internal Server Error |
INTERNAL_SERVER_ERROR |
Request failed due to an internal server error |
Examples
Sample Request | Sample Response |
---|---|
PUT v1/skills/amzn.skill.id.1234/asrAnnotationSets/123456-1234123-123123 HTTP/1.1
Content-Type: application/json
Accept: application/json
{
"name": "my new annotation set name"
}
|
HTTP 204 No Content
|
PUT v1/skills/amzn.skill.id.1234/asrAnnotationSets/123456-1234123-123123/properties HTTP/1.1
{
"name": ""
}
|
HTTP 400 BadRequest
Content-Type: application/json
{
"message": "Payload validations failed",
"violations": [{
"message": "The \"name\" property at property path \"$.name\" is outside the allowed range. Actual length: 0, Minimum length: 1",
"code": "INVALID_STRING_LENGTH"
}]
}
|