openapi: 3.2.0 info: title: Amazon Lex Model Building V2 Testexecutions API description: Amazon Lex V2 Model Building operations let you build and manage conversational bots — bots, aliases, locales, intents, slots, slot types, custom vocabularies, imports/exports, test sets and analytics. Derived mechanically from the AWS-published Smithy 2.0 service model (aws/api-models-aws, models/lex-models-v2/service/2020-08-07). Requests are signed with AWS Signature Version 4 using service name lex. version: '2020-08-07' contact: name: AWS Support url: https://aws.amazon.com/premiumsupport/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html x-generated-from: AWS Smithy 2.0 service model (https://github.com/aws/api-models-aws) — mechanical transform, no hand-authored operations servers: - url: https://models-v2-lex.us-east-1.amazonaws.com description: Amazon Lex V2 Model Building endpoint (us-east-1; one regional endpoint per AWS Region — see https://docs.aws.amazon.com/general/latest/gr/lex.html) security: - sigv4: [] tags: - name: testexecutions paths: /testexecutions: post: operationId: ListTestExecutions summary: The list of test set executions description: The list of test set executions. tags: - testexecutions requestBody: required: false content: application/json: schema: type: object properties: sortBy: $ref: '#/components/schemas/TestExecutionSortBy' maxResults: type: integer minimum: 1 maximum: 1000 description: The maximum number of test executions to return in each page. If there are fewer results than the max page size, only the actual number of results are returned. nextToken: type: string description: If the response from the ListTestExecutions operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results. responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/ListTestExecutionsResponse' '400': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' '402': description: ServiceQuotaExceededException content: application/json: schema: $ref: '#/components/schemas/ServiceQuotaExceededException' '429': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' '500': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' /testexecutions/{testExecutionId}: get: operationId: DescribeTestExecution summary: Gets metadata information about the test execution description: Gets metadata information about the test execution. tags: - testexecutions parameters: - name: testExecutionId in: path required: true description: The execution Id of the test set execution. schema: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DescribeTestExecutionResponse' '400': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' '402': description: ServiceQuotaExceededException content: application/json: schema: $ref: '#/components/schemas/ServiceQuotaExceededException' '404': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' '429': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' '500': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' /testexecutions/{testExecutionId}/artifacturl: get: operationId: GetTestExecutionArtifactsUrl summary: The pre-signed Amazon S3 URL to download the test execution result artifacts description: The pre-signed Amazon S3 URL to download the test execution result artifacts. tags: - testexecutions parameters: - name: testExecutionId in: path required: true description: The unique identifier of the completed test execution. schema: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GetTestExecutionArtifactsUrlResponse' '400': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' '402': description: ServiceQuotaExceededException content: application/json: schema: $ref: '#/components/schemas/ServiceQuotaExceededException' '404': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' '429': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' '500': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' /testexecutions/{testExecutionId}/results: post: operationId: ListTestExecutionResultItems summary: Gets a list of test execution result items description: Gets a list of test execution result items. tags: - testexecutions parameters: - name: testExecutionId in: path required: true description: The unique identifier of the test execution to list the result items. schema: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ requestBody: required: true content: application/json: schema: type: object properties: resultFilterBy: $ref: '#/components/schemas/TestExecutionResultFilterBy' maxResults: type: integer minimum: 1 maximum: 1000 description: The maximum number of test execution result items to return in each page. If there are fewer results than the max page size, only the actual number of results are returned. nextToken: type: string description: If the response from the ListTestExecutionResultItems operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results. required: - resultFilterBy responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/ListTestExecutionResultItemsResponse' '400': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' '402': description: ServiceQuotaExceededException content: application/json: schema: $ref: '#/components/schemas/ServiceQuotaExceededException' '404': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' '429': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' '500': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' components: schemas: IntentLevelSlotResolutionTestResults: type: object description: Indicates the success or failure of slots at the intent level. properties: items: type: array items: $ref: '#/components/schemas/IntentLevelSlotResolutionTestResultItem' required: - items ConversationLevelTestResultsFilterBy: type: object description: The selection to filter the test set results data at the conversation level. properties: endToEndResult: type: string enum: - Matched - Mismatched - ExecutionError description: The selection of matched or mismatched end-to-end status to filter test set results data at the conversation level. InternalServerException: type: object description: The service encountered an unexpected condition. Try your request again. properties: message: type: string TestExecutionResultFilterBy: type: object description: Contains information about the method by which to filter the results of the test execution. properties: resultTypeFilter: type: string enum: - OverallTestResults - ConversationLevelTestResults - IntentClassificationTestResults - SlotResolutionTestResults - UtteranceLevelResults description: Specifies which results to filter. See Test result details">Test results details for details about different types of results. conversationLevelTestResultsFilterBy: $ref: '#/components/schemas/ConversationLevelTestResultsFilterBy' required: - resultTypeFilter DescribeTestExecutionResponse: type: object properties: testExecutionId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The execution Id for the test set execution. creationDateTime: type: string format: date-time description: The execution creation date and time for the test set execution. lastUpdatedDateTime: type: string format: date-time description: The date and time of the last update for the execution. testExecutionStatus: type: string enum: - Pending - Waiting - InProgress - Completed - Failed - Stopping - Stopped description: The test execution status for the test execution. testSetId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The test set Id for the test set execution. testSetName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The test set name of the test set execution. target: $ref: '#/components/schemas/TestExecutionTarget' apiMode: type: string enum: - Streaming - NonStreaming description: Indicates whether we use streaming or non-streaming APIs are used for the test set execution. For streaming, StartConversation Amazon Lex Runtime API is used. Whereas for non-streaming, RecognizeUtterance and RecognizeText Amazon Lex Runtime API is used. testExecutionModality: type: string enum: - Text - Audio description: Indicates whether test set is audio or text. failureReasons: type: array items: type: string UserTurnSlotOutput: type: object description: Contains information about a slot output by the test set execution. properties: value: type: string minLength: 1 description: The value output by the slot recognition. values: type: array items: $ref: '#/components/schemas/UserTurnSlotOutput' subSlots: type: object additionalProperties: $ref: '#/components/schemas/UserTurnSlotOutput' ConversationLevelSlotResolutionResultItem: type: object description: The slots used for the slot resolution in the conversation. properties: intentName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The intents used in the slots list for the slot resolution details. slotName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_.-]?)+$ description: The slot name in the slots list for the slot resolution details. matchResult: type: string enum: - Matched - Mismatched - ExecutionError description: The number of matching slots used in the slots listings for the slot resolution evaluation. required: - intentName - slotName - matchResult AgentTurnResult: type: object description: The information about the agent turn in a test set execution. properties: expectedAgentPrompt: type: string minLength: 1 maxLength: 1024 description: The expected agent prompt for the agent turn in a test set execution. actualAgentPrompt: type: string minLength: 1 maxLength: 1024 description: The actual agent prompt for the agent turn in a test set execution. errorDetails: $ref: '#/components/schemas/ExecutionErrorDetails' actualElicitedSlot: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_.-]?)+$ description: The actual elicited slot for the agent turn in a test set execution. actualIntent: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The actual intent for the agent turn in a test set execution. required: - expectedAgentPrompt IntentLevelSlotResolutionTestResultItem: type: object description: Information about intent-level slot resolution in a test result. properties: intentName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The name of the intent that was recognized. multiTurnConversation: type: boolean description: Indicates whether the conversation involves multiple turns or not. slotResolutionResults: type: array items: $ref: '#/components/schemas/SlotResolutionTestResultItem' required: - intentName - multiTurnConversation - slotResolutionResults UserTurnInputSpecification: type: object description: Contains information about the user messages in the turn in the input. properties: utteranceInput: $ref: '#/components/schemas/UtteranceInputSpecification' requestAttributes: type: object additionalProperties: type: string sessionState: $ref: '#/components/schemas/InputSessionStateSpecification' required: - utteranceInput ValidationException: type: object description: One of the input parameters in your request isn't valid. Check the parameters and try your request again. properties: message: type: string TestSetTurnResult: type: object description: Contains information about the results of the analysis of a turn in the test set. properties: agent: $ref: '#/components/schemas/AgentTurnResult' user: $ref: '#/components/schemas/UserTurnResult' ListTestExecutionResultItemsResponse: type: object properties: testExecutionResults: $ref: '#/components/schemas/TestExecutionResultItems' nextToken: type: string description: A token that indicates whether there are more results to return in a response to the ListTestExecutionResultItems operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListTestExecutionResultItems operation request to get the next page of results. UtteranceLevelTestResultItem: type: object description: Contains information about multiple utterances in the results of a test set execution. properties: recordNumber: type: integer format: int64 minimum: 1 maximum: 200000 description: The record number of the result. conversationId: type: string minLength: 1 maxLength: 50 pattern: ^([0-9a-zA-Z][_-]?)+$ description: The unique identifier for the conversation associated with the result. turnResult: $ref: '#/components/schemas/TestSetTurnResult' required: - recordNumber - turnResult GetTestExecutionArtifactsUrlResponse: type: object properties: testExecutionId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The unique identifier of the completed test execution. downloadArtifactsUrl: type: string minLength: 1 maxLength: 1024 description: The pre-signed Amazon S3 URL to download completed test execution. ResourceNotFoundException: type: object description: You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try again. properties: message: type: string ConversationLevelIntentClassificationResultItem: type: object description: The item listing the evaluation of intent level success or failure. properties: intentName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The intent name used in the evaluation of intent level success or failure. matchResult: type: string enum: - Matched - Mismatched - ExecutionError description: The number of times the specific intent is used in the evaluation of intent level success or failure. required: - intentName - matchResult OverallTestResultItem: type: object description: Information about the overall results for a test execution result. properties: multiTurnConversation: type: boolean description: Indicates whether the conversation contains multiple turns or not. totalResultCount: type: integer description: The total number of overall results in the result of the test execution. speechTranscriptionResultCounts: type: object additionalProperties: type: integer endToEndResultCounts: type: object additionalProperties: type: integer required: - multiTurnConversation - totalResultCount - endToEndResultCounts UtteranceAudioInputSpecification: type: object description: Contains information about the audio for an utterance. properties: audioFileS3Location: type: string minLength: 1 maxLength: 1024 pattern: ^s3://([a-z0-9\\.-]+)/(.+)$ description: Amazon S3 file pointing to the audio. required: - audioFileS3Location ListTestExecutionsResponse: type: object properties: testExecutions: type: array items: $ref: '#/components/schemas/TestExecutionSummary' nextToken: type: string description: A token that indicates whether there are more results to return in a response to the ListTestExecutions operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListTestExecutions operation request to get the next page of results. ThrottlingException: type: object description: Your request rate is too high. Reduce the frequency of requests. properties: retryAfterSeconds: type: integer description: The number of seconds after which the user can invoke the API again. message: type: string IntentClassificationTestResults: type: object description: Information for the results of the intent classification test. properties: items: type: array items: $ref: '#/components/schemas/IntentClassificationTestResultItem' required: - items RuntimeHintDetails: type: object description: Provides an array of phrases that should be given preference when resolving values for a slot. properties: runtimeHintValues: type: array items: $ref: '#/components/schemas/RuntimeHintValue' subSlotHints: type: object additionalProperties: $ref: '#/components/schemas/RuntimeHintDetails' UtteranceInputSpecification: type: object description: Contains information about input of an utterance. properties: textInput: type: string minLength: 1 maxLength: 1024 description: A text input transcription of the utterance. It is only applicable for test-sets containing text data. audioInput: $ref: '#/components/schemas/UtteranceAudioInputSpecification' SlotResolutionTestResultItem: type: object description: Information about the success and failure rate of slot resolution in the results of a test execution. properties: slotName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_.-]?)+$ description: The name of the slot. resultCounts: $ref: '#/components/schemas/SlotResolutionTestResultItemCounts' required: - slotName - resultCounts UserTurnOutputSpecification: type: object description: Contains results that are output for the user turn by the test execution. properties: intent: $ref: '#/components/schemas/UserTurnIntentOutput' activeContexts: type: array items: $ref: '#/components/schemas/ActiveContext' transcript: type: string minLength: 1 maxLength: 1024 description: The transcript that is output for the user turn by the test execution. required: - intent TestExecutionResultItems: type: object description: Contains the results of the test execution, grouped by type of results. See Test result details">Test results details for details about different types of results. properties: overallTestResults: $ref: '#/components/schemas/OverallTestResults' conversationLevelTestResults: $ref: '#/components/schemas/ConversationLevelTestResults' intentClassificationTestResults: $ref: '#/components/schemas/IntentClassificationTestResults' intentLevelSlotResolutionTestResults: $ref: '#/components/schemas/IntentLevelSlotResolutionTestResults' utteranceLevelTestResults: $ref: '#/components/schemas/UtteranceLevelTestResults' UserTurnResult: type: object description: Contains the results for the user turn by the test execution. properties: input: $ref: '#/components/schemas/UserTurnInputSpecification' expectedOutput: $ref: '#/components/schemas/UserTurnOutputSpecification' actualOutput: $ref: '#/components/schemas/UserTurnOutputSpecification' errorDetails: $ref: '#/components/schemas/ExecutionErrorDetails' endToEndResult: type: string enum: - Matched - Mismatched - ExecutionError description: Specifies whether the expected and actual outputs match or not, or if there is an error in execution. intentMatchResult: type: string enum: - Matched - Mismatched - ExecutionError description: Specifies whether the expected and actual intents match or not. slotMatchResult: type: string enum: - Matched - Mismatched - ExecutionError description: Specifies whether the expected and actual slots match or not. speechTranscriptionResult: type: string enum: - Matched - Mismatched - ExecutionError description: Specifies whether the expected and actual speech transcriptions match or not, or if there is an error in execution. conversationLevelResult: $ref: '#/components/schemas/ConversationLevelResultDetail' required: - input - expectedOutput IntentClassificationTestResultItemCounts: type: object description: The number of items in the intent classification test. properties: totalResultCount: type: integer description: The total number of results in the intent classification test. speechTranscriptionResultCounts: type: object additionalProperties: type: integer intentMatchResultCounts: type: object additionalProperties: type: integer required: - totalResultCount - intentMatchResultCounts IntentClassificationTestResultItem: type: object description: Information for an intent that is classified by the test workbench. properties: intentName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The name of the intent. multiTurnConversation: type: boolean description: Indicates whether the conversation involves multiple turns or not. resultCounts: $ref: '#/components/schemas/IntentClassificationTestResultItemCounts' required: - intentName - multiTurnConversation - resultCounts TestExecutionSortBy: type: object description: Contains information about the method by which to sort the instances of test executions you have carried out. properties: attribute: type: string enum: - TestSetName - CreationDateTime description: Specifies whether to sort the test set executions by the date and time at which the test sets were created. order: type: string enum: - Ascending - Descending description: Specifies whether to sort in ascending or descending order. required: - attribute - order UtteranceLevelTestResults: type: object description: Contains information about the utterances in the results of the test set execution. properties: items: type: array items: $ref: '#/components/schemas/UtteranceLevelTestResultItem' required: - items UserTurnIntentOutput: type: object description: Contains information about the intent that is output for the turn by the test execution. properties: name: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The name of the intent. slots: type: object additionalProperties: $ref: '#/components/schemas/UserTurnSlotOutput' required: - name ConversationLevelResultDetail: type: object description: The conversation level details of the conversation used in the test set. properties: endToEndResult: type: string enum: - Matched - Mismatched - ExecutionError description: The success or failure of the streaming of the conversation. speechTranscriptionResult: type: string enum: - Matched - Mismatched - ExecutionError description: The speech transcription success or failure details of the conversation. required: - endToEndResult OverallTestResults: type: object description: Information about the overall test results. properties: items: type: array items: $ref: '#/components/schemas/OverallTestResultItem' required: - items RuntimeHints: type: object description: You can provide Amazon Lex with hints to the phrases that a customer is likely to use for a slot. When a slot with hints is resolved, the phrases in the runtime hints are preferred in the resolution. You can provide hints for a maximum of 100 intents. You can provide a maximum of 100 slots. Before you can use runtime hints with an existing bot, you must first rebuild the bot. For more information, see Using runtime hints to improve recognition of slot values. properties: slotHints: type: object additionalProperties: type: object additionalProperties: $ref: '#/components/schemas/RuntimeHintDetails' BotAliasTestExecutionTarget: type: object description: The target Amazon S3 location for the test set execution using a bot alias. properties: botId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The bot Id of the bot alias used in the test set execution. botAliasId: type: string minLength: 10 maxLength: 10 pattern: ^(\bTSTALIASID\b|[0-9a-zA-Z]+)$ description: The bot alias Id of the bot alias used in the test set execution. localeId: type: string description: The locale Id of the bot alias used in the test set execution. required: - botId - botAliasId - localeId RuntimeHintValue: type: object description: Provides the phrase that Amazon Lex should look for in the user's input to the bot. properties: phrase: type: string minLength: 1 maxLength: 140 description: The phrase that Amazon Lex should look for in the user's input to the bot. required: - phrase InputSessionStateSpecification: type: object description: Specifications for the current state of the dialog between the user and the bot in the test set. properties: sessionAttributes: type: object additionalProperties: type: string activeContexts: type: array items: $ref: '#/components/schemas/ActiveContext' runtimeHints: $ref: '#/components/schemas/RuntimeHints' TestExecutionSummary: type: object description: Summarizes metadata about the test execution. properties: testExecutionId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The unique identifier of the test execution. creationDateTime: type: string format: date-time description: The date and time at which the test execution was created. lastUpdatedDateTime: type: string format: date-time description: The date and time at which the test execution was last updated. testExecutionStatus: type: string enum: - Pending - Waiting - InProgress - Completed - Failed - Stopping - Stopped description: The current status of the test execution. testSetId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The unique identifier of the test set used in the test execution. testSetName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The name of the test set used in the test execution. target: $ref: '#/components/schemas/TestExecutionTarget' apiMode: type: string enum: - Streaming - NonStreaming description: Specifies whether the API mode for the test execution is streaming or non-streaming. testExecutionModality: type: string enum: - Text - Audio description: Specifies whether the data used for the test execution is written or spoken. ActiveContext: type: object description: The active context used in the test execution. properties: name: type: string minLength: 1 maxLength: 100 pattern: ^([A-Za-z]_?)+$ description: The name of active context. required: - name ConversationLevelTestResultItem: type: object description: The test result evaluation item at the conversation level. properties: conversationId: type: string minLength: 1 maxLength: 50 pattern: ^([0-9a-zA-Z][_-]?)+$ description: The conversation Id of the test result evaluation item. endToEndResult: type: string enum: - Matched - Mismatched - ExecutionError description: The end-to-end success or failure of the test result evaluation item. speechTranscriptionResult: type: string enum: - Matched - Mismatched - ExecutionError description: The speech transcription success or failure of the test result evaluation item. intentClassificationResults: type: array items: $ref: '#/components/schemas/ConversationLevelIntentClassificationResultItem' slotResolutionResults: type: array items: $ref: '#/components/schemas/ConversationLevelSlotResolutionResultItem' required: - conversationId - endToEndResult - intentClassificationResults - slotResolutionResults SlotResolutionTestResultItemCounts: type: object description: Information about the counts for a slot resolution in the results of a test execution. properties: totalResultCount: type: integer description: The total number of results. speechTranscriptionResultCounts: type: object additionalProperties: type: integer slotMatchResultCounts: type: object additionalProperties: type: integer required: - totalResultCount - slotMatchResultCounts ExecutionErrorDetails: type: object description: Details about an error in an execution of a test set. properties: errorCode: type: string minLength: 1 description: The error code for the error. errorMessage: type: string minLength: 1 description: The message describing the error. required: - errorCode - errorMessage TestExecutionTarget: type: object description: Contains information about the bot used for the test execution. properties: botAliasTarget: $ref: '#/components/schemas/BotAliasTestExecutionTarget' ServiceQuotaExceededException: type: object description: You have reached a quota for your bot. properties: message: type: string ConversationLevelTestResults: type: object description: The test set results data at the conversation level. properties: items: type: array items: $ref: '#/components/schemas/ConversationLevelTestResultItem' required: - items securitySchemes: sigv4: type: apiKey name: Authorization in: header x-amazon-apigateway-authtype: awsSigv4 description: AWS Signature Version 4. Sign requests with SigV4 using service name `lex` and the calling region.