Menu
Amazon Lex
Developer Guide

GetBot

Returns metadata information for a specific bot. You must provide the bot name and the bot version or alias.

This operation requires permissions for the lex:GetBot action.

Request Syntax

GET /bots/name/versions/versionoralias HTTP/1.1

URI Request Parameters

The request requires the following URI parameters.

name

The name of the bot. The name is case sensitive.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: ^[a-zA-Z]+((_[a-zA-Z]+)*|([a-zA-Z]+_)*|_)

versionOrAlias

The version or alias of the bot.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "abortStatement": { "messages": [ { "content": "string", "contentType": "string" } ], "responseCard": "string" }, "checksum": "string", "childDirected": boolean, "clarificationPrompt": { "maxAttempts": number, "messages": [ { "content": "string", "contentType": "string" } ], "responseCard": "string" }, "createdDate": number, "description": "string", "failureReason": "string", "idleSessionTTLInSeconds": number, "intents": [ { "intentName": "string", "intentVersion": "string" } ], "lastUpdatedDate": number, "locale": "string", "name": "string", "status": "string", "version": "string", "voiceId": "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.

abortStatement

The message that Amazon Lex returns when the user elects to end the conversation without completing it. For more information, see PutBot.

Type: Statement object

checksum

Checksum of the bot used to identify a specific revision of the bot's $LATEST version.

Type: String

childDirected

For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA.

If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ.

Type: Boolean

clarificationPrompt

The message Amazon Lex uses when it doesn't understand the user's request. For more information, see PutBot.

Type: Prompt object

createdDate

The date that the bot was created.

Type: Timestamp

description

A description of the bot.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 200.

failureReason

If status is FAILED, Amazon Lex explains why it failed to build the bot.

Type: String

idleSessionTTLInSeconds

The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. For more information, see PutBot.

Type: Integer

Valid Range: Minimum value of 60. Maximum value of 86400.

intents

An array of intent objects. For more information, see PutBot.

Type: Array of Intent objects

lastUpdatedDate

The date that the bot was updated. When you create a resource, the creation date and last updated date are the same.

Type: Timestamp

locale

The target locale for the bot.

Type: String

Valid Values: en-US

name

The name of the bot.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: ^[a-zA-Z]+((_[a-zA-Z]+)*|([a-zA-Z]+_)*|_)

status

The status of the bot. If the bot is ready to run, the status is READY. If there was a problem with building the bot, the status is FAILED and the failureReason explains why the bot did not build. If the bot was saved but not built, the status is NOT BUILT.

Type: String

Valid Values: BUILDING | READY | FAILED | NOT_BUILT

version

The version of the bot. For a new bot, the version is always $LATEST.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: \$LATEST|[0-9]+

voiceId

The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. For more information, see PutBot.

Type: String

Errors

BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.

HTTP Status Code: 400

InternalFailureException

An internal Amazon Lex error occurred. Try your request again.

HTTP Status Code: 500

LimitExceededException

The request exceeded a limit. Try your request again.

HTTP Status Code: 429

NotFoundException

The resource specified in the request was not found. Check the resource and try again.

HTTP Status Code: 404

See Also

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