{"files":{"SKILL.md":"---\nname: amazon-lex-runtime-v2\ndescription: \"Amazon Lex Runtime V2 API skill. Use when working with Amazon Lex Runtime V2 for bots. Covers 5 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Amazon Lex Runtime V2\nAPI version: 2020-08-07\n\n## Auth\nAWS SigV4\n\n## Base URL\nNot specified.\n\n## Setup\n1. Configure auth: AWS SigV4\n2. GET /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId} -- returns session information for a specified bot, alias, and user. for example, you can use this operation to retrieve session information for a user that has left a long-running session in use. if the bot, alias, or session identifier doesn't exist, amazon lex v2 returns a badrequestexception. if the locale doesn't exist or is not enabled for the alias, you receive a badrequestexception.\n3. POST /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId} -- create first session\n\n## Endpoints\n5 endpoints across 1 group. See references/api-spec.lap for full details.\n\n### Bots\n| Method | Path | Description |\n|--------|------|-------------|\n| DELETE | /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId} | Removes session information for a specified bot, alias, and user ID.  You can use this operation to restart a conversation with a bot. When you remove a session, the entire history of the session is removed so that you can start again. You don't need to delete a session. Sessions have a time limit and will expire. Set the session time limit when you create the bot. The default is 5 minutes, but you can specify anything between 1 minute and 24 hours. If you specify a bot or alias ID that doesn't exist, you receive a BadRequestException.  If the locale doesn't exist in the bot, or if the locale hasn't been enables for the alias, you receive a BadRequestException. |\n| GET | /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId} | Returns session information for a specified bot, alias, and user. For example, you can use this operation to retrieve session information for a user that has left a long-running session in use. If the bot, alias, or session identifier doesn't exist, Amazon Lex V2 returns a BadRequestException. If the locale doesn't exist or is not enabled for the alias, you receive a BadRequestException. |\n| POST | /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId} | Creates a new session or modifies an existing session with an Amazon Lex V2 bot. Use this operation to enable your application to set the state of the bot. |\n| POST | /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text | Sends user input to Amazon Lex V2. Client applications use this API to send requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input using the machine learning model that it build for the bot. In response, Amazon Lex V2 returns the next message to convey to the user and an optional response card to display. If the optional post-fulfillment response is specified, the messages are returned as follows. For more information, see PostFulfillmentStatusSpecification.    Success message - Returned if the Lambda function completes successfully and the intent state is fulfilled or ready fulfillment if the message is present.    Failed message - The failed message is returned if the Lambda function throws an exception or if the Lambda function returns a failed intent state without a message.    Timeout message - If you don't configure a timeout message and a timeout, and the Lambda function doesn't return within 30 seconds, the timeout message is returned. If you configure a timeout, the timeout message is returned when the period times out.    For more information, see Completion message. |\n| POST | /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance | Sends user input to Amazon Lex V2. You can send text or speech. Clients use this API to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2 interprets the user input using the machine learning model built for the bot. The following request fields must be compressed with gzip and then base64 encoded before you send them to Amazon Lex V2.    requestAttributes   sessionState   The following response fields are compressed using gzip and then base64 encoded by Amazon Lex V2. Before you can use these fields, you must decode and decompress them.    inputTranscript   interpretations   messages   requestAttributes   sessionState   The example contains a Java application that compresses and encodes a Java object to send to Amazon Lex V2, and a second that decodes and decompresses a response from Amazon Lex V2. If the optional post-fulfillment response is specified, the messages are returned as follows. For more information, see PostFulfillmentStatusSpecification.    Success message - Returned if the Lambda function completes successfully and the intent state is fulfilled or ready fulfillment if the message is present.    Failed message - The failed message is returned if the Lambda function throws an exception or if the Lambda function returns a failed intent state without a message.    Timeout message - If you don't configure a timeout message and a timeout, and the Lambda function doesn't return within 30 seconds, the timeout message is returned. If you configure a timeout, the timeout message is returned when the period times out.    For more information, see Completion message. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Delete a session?\" -> DELETE /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}\n- \"Get session details?\" -> GET /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}\n- \"Create a text?\" -> POST /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text\n- \"Create a utterance?\" -> POST /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Amazon Lex Runtime V2\n@version 2020-08-07\n@auth AWS SigV4\n@endpoints 5\n@toc bots(5)\n\n@endpoint DELETE /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}\n@desc Removes session information for a specified bot, alias, and user ID.  You can use this operation to restart a conversation with a bot. When you remove a session, the entire history of the session is removed so that you can start again. You don't need to delete a session. Sessions have a time limit and will expire. Set the session time limit when you create the bot. The default is 5 minutes, but you can specify anything between 1 minute and 24 hours. If you specify a bot or alias ID that doesn't exist, you receive a BadRequestException.  If the locale doesn't exist in the bot, or if the locale hasn't been enables for the alias, you receive a BadRequestException.\n@required {botId: str, botAliasId: str, localeId: str, sessionId: str}\n@returns(200) {botId: str?, botAliasId: str?, localeId: str?, sessionId: str?}\n\n@endpoint GET /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}\n@desc Returns session information for a specified bot, alias, and user. For example, you can use this operation to retrieve session information for a user that has left a long-running session in use. If the bot, alias, or session identifier doesn't exist, Amazon Lex V2 returns a BadRequestException. If the locale doesn't exist or is not enabled for the alias, you receive a BadRequestException.\n@required {botId: str, botAliasId: str, localeId: str, sessionId: str}\n@returns(200) {sessionId: str?, messages: [Message]?, interpretations: [Interpretation]?, sessionState: SessionState?{dialogAction: DialogAction?{type: str, slotToElicit: str?, slotElicitationStyle: str?, subSlotToElicit: ElicitSubSlot?{name: str, subSlotToElicit: ElicitSubSlot?}}, intent: Intent?{name: str, slots: map<str, Slot>?: any, state: str?, confirmationState: str?}, activeContexts: [ActiveContext]?, sessionAttributes: map<str, str>?: any, originatingRequestId: str?, runtimeHints: RuntimeHints?{slotHints: map<str, map<str: any, RuntimeHintDetails>>?: any}}}\n\n@endpoint POST /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}\n@desc Creates a new session or modifies an existing session with an Amazon Lex V2 bot. Use this operation to enable your application to set the state of the bot.\n@required {botId: str, botAliasId: str, localeId: str, sessionId: str, sessionState: SessionState}\n@optional {ResponseContentType: str, messages: [Message], requestAttributes: map<str,str>}\n@returns(200) {contentType: str?, messages: str?, sessionState: str?, requestAttributes: str?, sessionId: str?, audioStream: bytes?}\n\n@endpoint POST /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text\n@desc Sends user input to Amazon Lex V2. Client applications use this API to send requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input using the machine learning model that it build for the bot. In response, Amazon Lex V2 returns the next message to convey to the user and an optional response card to display. If the optional post-fulfillment response is specified, the messages are returned as follows. For more information, see PostFulfillmentStatusSpecification.    Success message - Returned if the Lambda function completes successfully and the intent state is fulfilled or ready fulfillment if the message is present.    Failed message - The failed message is returned if the Lambda function throws an exception or if the Lambda function returns a failed intent state without a message.    Timeout message - If you don't configure a timeout message and a timeout, and the Lambda function doesn't return within 30 seconds, the timeout message is returned. If you configure a timeout, the timeout message is returned when the period times out.    For more information, see Completion message.\n@required {botId: str, botAliasId: str, localeId: str, sessionId: str, text: str}\n@optional {sessionState: SessionState, requestAttributes: map<str,str>}\n@returns(200) {messages: [Message]?, sessionState: SessionState?{dialogAction: DialogAction?{type: str, slotToElicit: str?, slotElicitationStyle: str?, subSlotToElicit: ElicitSubSlot?{name: str, subSlotToElicit: ElicitSubSlot?}}, intent: Intent?{name: str, slots: map<str, Slot>?: any, state: str?, confirmationState: str?}, activeContexts: [ActiveContext]?, sessionAttributes: map<str, str>?: any, originatingRequestId: str?, runtimeHints: RuntimeHints?{slotHints: map<str, map<str: any, RuntimeHintDetails>>?: any}}, interpretations: [Interpretation]?, requestAttributes: map<str,str>?, sessionId: str?, recognizedBotMember: RecognizedBotMember?{botId: str, botName: str?}}\n\n@endpoint POST /bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance\n@desc Sends user input to Amazon Lex V2. You can send text or speech. Clients use this API to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2 interprets the user input using the machine learning model built for the bot. The following request fields must be compressed with gzip and then base64 encoded before you send them to Amazon Lex V2.    requestAttributes   sessionState   The following response fields are compressed using gzip and then base64 encoded by Amazon Lex V2. Before you can use these fields, you must decode and decompress them.    inputTranscript   interpretations   messages   requestAttributes   sessionState   The example contains a Java application that compresses and encodes a Java object to send to Amazon Lex V2, and a second that decodes and decompresses a response from Amazon Lex V2. If the optional post-fulfillment response is specified, the messages are returned as follows. For more information, see PostFulfillmentStatusSpecification.    Success message - Returned if the Lambda function completes successfully and the intent state is fulfilled or ready fulfillment if the message is present.    Failed message - The failed message is returned if the Lambda function throws an exception or if the Lambda function returns a failed intent state without a message.    Timeout message - If you don't configure a timeout message and a timeout, and the Lambda function doesn't return within 30 seconds, the timeout message is returned. If you configure a timeout, the timeout message is returned when the period times out.    For more information, see Completion message.\n@required {botId: str, botAliasId: str, localeId: str, sessionId: str, Content-Type: str}\n@optional {x-amz-lex-session-state: str, x-amz-lex-request-attributes: str, Response-Content-Type: str, inputStream: bytes}\n@returns(200) {inputMode: str?, contentType: str?, messages: str?, interpretations: str?, sessionState: str?, requestAttributes: str?, sessionId: str?, inputTranscript: str?, audioStream: bytes?, recognizedBotMember: str?}\n\n@end\n"}}