getJourneyExecutionMetrics method
Retrieves (queries) pre-aggregated data for a standard execution metric that applies to a journey.
May throw BadRequestException. May throw InternalServerErrorException. May throw PayloadTooLargeException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException.
Parameter applicationId
:
The unique identifier for the application. This identifier is displayed as
the Project ID on the Amazon Pinpoint console.
Parameter journeyId
:
The unique identifier for the journey.
Parameter nextToken
:
The string that specifies which page of results to return in a paginated
response. This parameter is not supported for application, campaign, and
journey metrics.
Parameter pageSize
:
The maximum number of items to include in each page of a paginated
response. This parameter is not supported for application, campaign, and
journey metrics.
Implementation
Future<GetJourneyExecutionMetricsResponse> getJourneyExecutionMetrics({
required String applicationId,
required String journeyId,
String? nextToken,
String? pageSize,
}) async {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(journeyId, 'journeyId');
final $query = <String, List<String>>{
if (nextToken != null) 'next-token': [nextToken],
if (pageSize != null) 'page-size': [pageSize],
};
final response = await _protocol.sendRaw(
payload: null,
method: 'GET',
requestUri:
'/v1/apps/${Uri.encodeComponent(applicationId)}/journeys/${Uri.encodeComponent(journeyId)}/execution-metrics',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return GetJourneyExecutionMetricsResponse(
journeyExecutionMetricsResponse:
JourneyExecutionMetricsResponse.fromJson($json),
);
}