Utterance Conflict Detection API Reference
Use the Utterance Conflict Detection REST API to find utterances that map to more than one intent in your skill's interaction model. For more details about utterance conflicts, see Find Utterance Conflicts in Your Model.
API endpoint
The endpoint of the Utterance Conflict Detection API is https://api.amazonalexa.com
.
Authentication
Each API request must have an authorization header whose value is the access token retrieved from Login with Amazon (LWA). For details, see Get an Access Token for SMAPI.
Operations
The Utterance Conflict Detection API includes the following operations.
Operation | HTTP method and URI |
---|---|
| |
|
Detect utterance conflicts
Detect utterance conflicts in the specified interaction model. It might take awhile to get the results of the conflict detection. Use Get conflict detection status to get the status of the request.
Request
To detect conflicts, you make a GET
request to the conflicts
resource.
Request path and header example
GET /v1/skills/{skillId}/stages/{stage}/interactionModel/locales/{locale}/versions/{version}/conflicts&maxResults={maxResults}&nextToken={nextToken}
Host: api.amazonalexa.com
Content-Type: application/json
Authorization: Bearer {access token}
Accept: application/json
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Identifies the skill. |
String |
Yes |
|
Path |
Indicates stage of the skill. |
String |
Yes |
|
Path |
Version of the interaction model to test. |
String |
Yes |
|
Path |
Locale of the interaction model to test. |
String |
Yes |
|
Query |
Maximum number of results to return in the response. |
Integer |
No |
|
Query |
Token from the previous response. |
String |
No |
|
Header |
String |
Yes |
Request body example
The request has no body.
Request body properties
The request has no body.
Response
A successful response returns HTTP 200 OK
, along with the details of the utterance conflicts.
On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message.
Response body examples
The following response shows an utterance conflict where the value "orange" overlaps between a built-in slot type in one intent and a custom slot type in another intent.
The following response shows an utterance conflict between a custom intent and a built-in intent. Alexa prioritizes the custom intent over the built-in intent. In the example, "help" always resolves to your intent instead of the built-in. If you want the utterance to map to your custom intent rather than the built-in intent, leave the conflict in place.
Response body properties
Property | Description | Type |
---|---|---|
|
Information about the set of results. |
Object |
|
Indicates there is more content. If present, the response contains a subset of the annotations. When there is no more content, |
Object |
|
Identifies the next set of results to return. The token expires in 24 hours. |
String |
|
Identifies the total number of results found. This value might be more than |
Integer |
|
Description |
Array of objects |
|
Utterance that causes conflicts among different intents. |
String |
|
Identifies the intents and slots with which the utterance conflicts. |
Array of objects |
|
Sample utterance defined for this intent in the interaction model. |
String |
|
Intent defined for the sample utterance in the interaction model. |
Object |
|
Name of the intent with which the utterance conflicts. |
String |
|
(Optional) Slot that match the conflicting utterance. |
Object |
|
Slot type. |
String |
|
(Optional) Resolved slot value. |
String |
|
Links for result navigation. |
_links object |
HTTP status codes
Status | Description |
---|---|
|
Response body contains the details of the utterance conflicts. |
|
Indicates that one or more properties in the request body are invalid.
|
|
Request didn't include the authorization token or the token is invalid or expired. Or, the client doesn't have access to the resource. |
|
Indicates that the authorization token is valid, but the requested operation isn't allowed. |
|
Requested resource not found. |
|
Skill has exceeded the permitted rate limit (specified number of requests per unit of time). The skill can retry the request by using exponential back-off. |
|
Error occurred on the server. The skill can retry the request by using exponential back-off. |
|
Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request. |
Get conflict detection status
Get the current status of a recently submitted conflict detection request. After the request completes, use Detect utterance conflicts to get the results.
Request
To get the status of a conflict detection request, you make a GET
request to the conflictDetectionJobStatus
resource.
Request path and header example
GET /v1/skills/{skillId}/stages/{stage}/interactionModel/locales/{locale}/versions/{version}/conflictDetectionJobStatus
Host: api.amazonalexa.com
Content-Type: application/json
Authorization: Bearer {access token}
Accept: application/json
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Identifies the skill. |
String |
Yes |
|
Path |
Indicates stage of the skill. |
String |
Yes |
|
Path |
Version of the interaction model to test. |
String |
Yes |
|
Path |
Locale of the interaction model to test. |
String |
Yes |
|
Header |
String |
Yes |
Request body example
The request has no body.
Request body properties
The request has no body.
Response
A successful response returns HTTP 200 OK
, along with status of the conflict detection.
On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message.
Response body example
{
"status": "COMPLETED",
"totalConflicts": 1
}
Response body properties
Property | Description | Type |
---|---|---|
|
Status of the utterance conflict detection request. |
String |
|
Total number of conflicts detected. |
Long |
HTTP status codes
Status | Description |
---|---|
|
Response body contains the status of the conflict detection request. |
|
Indicates that one or more properties in the request body are invalid.
|
|
Request didn't include the authorization token or the token is invalid or expired. Or, the client doesn't have access to the resource. |
|
Indicates that the authorization token is valid, but the requested operation isn't allowed. |
|
Requested resource not found. |
|
Skill has exceeded the permitted rate limit (specified number of requests per unit of time). The skill can retry the request by using exponential back-off. |
|
Error occurred on the server. The skill can retry the request by using exponential back-off. |
|
Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request. |
Object definitions
The Utterance Conflict Detection API defines the following objects.
Locale values
The following table shows valid values for the locale
property.
Locale code | Language |
---|---|
|
Arabic (SA) |
|
German (DE) |
|
English (AU) |
|
English (CA) |
|
English (UK) |
|
English (IN) |
|
English (US) |
|
Spanish (ES) |
|
Spanish (MX) |
|
Spanish (US) |
|
French (CA) |
|
French (FR) |
|
Hindi (IN) |
|
Italian (IT) |
|
Japanese (JP) |
|
Portuguese (BR) |
Related topics
- Best Practices for Sample Utterances and Custom Slot Type Values
- Improve Sample Utterance Coverage with Recommendations
- Utterance Profiler REST API Reference
Last updated: Jan 27, 2023