DescribeBotAnalyzerRecommendation - Amazon Lex API Reference

DescribeBotAnalyzerRecommendation

Retrieves the analysis results and recommendations for bot optimization. The analysis must be in Available status before recommendations can be retrieved.

Recommendations are returned with pagination support. Each recommendation includes the issue location, priority level, detailed description, and proposed fix.

Request Syntax

POST /bots/botId/botanalyzer/describe/botAnalyzerRequestId/ HTTP/1.1 Content-type: application/json { "maxResults": number, "nextToken": "string" }

URI Request Parameters

The request uses the following URI parameters.

botAnalyzerRequestId

The unique identifier of the analysis request.

Length Constraints: Fixed length of 36.

Pattern: [a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}

Required: Yes

botId

The unique identifier of the bot.

Length Constraints: Fixed length of 10.

Pattern: ^[0-9a-zA-Z]+$

Required: Yes

Request Body

The request accepts the following data in JSON format.

maxResults

The maximum number of recommendations to return in the response. The default is 5.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 1000.

Required: No

nextToken

If the response from a previous request was truncated, the nextToken value is used to retrieve the next page of recommendations.

Type: String

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "botAnalyzerRecommendationList": [ { "issueDescription": "string", "issueLocation": { "botLocale": "string", "intentId": "string", "slotId": "string" }, "priority": "string", "proposedFix": "string" } ], "botAnalyzerStatus": "string", "botId": "string", "botVersion": "string", "creationDateTime": number, "localeId": "string", "nextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

botAnalyzerRecommendationList

A list of recommendations for optimizing your bot configuration. Each recommendation includes the issue location, priority, description, and proposed fix.

Type: Array of BotAnalyzerRecommendation objects

botAnalyzerStatus

The current status of the analysis.

Valid Values: Processing | Available | Failed | Stopping | Stopped

Type: String

Valid Values: Processing | Available | Failed | Stopping | Stopped

botId

The unique identifier of the bot.

Type: String

Length Constraints: Fixed length of 10.

Pattern: ^[0-9a-zA-Z]+$

botVersion

The version of the bot that was analyzed.

Type: String

Length Constraints: Fixed length of 5.

Pattern: ^DRAFT$

creationDateTime

The date and time when the analysis was initiated.

Type: Timestamp

localeId

The locale identifier of the bot locale that was analyzed.

Type: String

nextToken

If the response is truncated, this token can be used in a subsequent request to retrieve the next page of recommendations.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerException

The service encountered an unexpected condition. Try your request again.

HTTP Status Code: 500

ResourceNotFoundException

You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try again.

HTTP Status Code: 404

ThrottlingException

Your request rate is too high. Reduce the frequency of requests.

retryAfterSeconds

The number of seconds after which the user can invoke the API again.

HTTP Status Code: 429

ValidationException

One of the input parameters in your request isn't valid. Check the parameters and try your request again.

HTTP Status Code: 400

Examples

Example request

This example illustrates one usage of DescribeBotAnalyzerRecommendation.

POST https://models-v2-lex.us-east-1.amazonaws.com/bots/<BotId>/botanalyzer/describe/<RequestId>/ Payload: { "nextToken": "" }

Example response

This example illustrates one usage of DescribeBotAnalyzerRecommendation.

{ "botId": "<BotId>", "localeId": "en_US", "botVersion": "DRAFT", "creationDateTime": 1729570423.948, "botAnalyzerStatus": "Available", "botAnalyzerRecommendationList": [ { "issueLocation": { "botLocale": "en_US", "intentId": "BookHotel", "slotId": null }, "priority": "High", "issueDescription": "Intent 'BookHotel' has overlapping utterances with 'ReserveRoom' intent that may cause routing confusion", "proposedFix": "Consider consolidating these intents or making utterances more distinct. For example, use 'book a hotel room' vs 'reserve a conference room'" } ], "nextToken": "<NextToken>" }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: