listBotAnalyzerHistory method
Retrieves a list of historical bot analysis executions for a specific bot. You can filter the results by locale and bot version.
The history includes all analysis executions regardless of their status, allowing you to track past analyses and their outcomes.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter botId :
The unique identifier of the bot.
Parameter botVersion :
The bot version to filter the history. If not specified, defaults to
DRAFT.
Parameter localeId :
The locale identifier to filter the history. If not specified, returns
history for all locales.
Parameter maxResults :
The maximum number of history entries to return in the response. The
default is 10.
Parameter nextToken :
If the response from a previous request was truncated, the
nextToken value is used to retrieve the next page of history
entries.
Implementation
Future<ListBotAnalyzerHistoryResponse> listBotAnalyzerHistory({
required String botId,
String? botVersion,
String? localeId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $payload = <String, dynamic>{
if (botVersion != null) 'botVersion': botVersion,
if (localeId != null) 'localeId': localeId,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/bots/${Uri.encodeComponent(botId)}/botanalyzer/history',
exceptionFnMap: _exceptionFns,
);
return ListBotAnalyzerHistoryResponse.fromJson(response);
}