getEventTopWithHttpInfo method
Top returns the caller org's ranked lenses for one window, five of them at once.
Top returns the caller org's ranked lenses for one window, five of them at once. models ranks LLM models by spend and is always real; products ranks commerce orders by revenue; topPages ranks requested paths, topReferrers the external referrer domains ("(direct)" for a missing or same-origin one) and topSources the utm_source campaigns ("(none)" when absent), each by pageviews. Every lens carries each row's share of the in-window total, so a top-N honestly shows the long tail. The four event lenses report available=false rather than fabricating zeros when the product-event table holds nothing yet. The org is the validated principal's — never a parameter. 403 without a validated bearer, 400 on an unknown range, 503 when the warehouse is unreachable.
Note: This method returns the HTTP Response.
Parameters:
-
String range: Range is a relative window: a count and a unit — 24h, 7d, 90d, any
-
String start: Start is the inclusive lower bound of a custom window, RFC3339. Requires end.
-
String end: End is the exclusive upper bound of a custom window, RFC3339. Requires start.
-
int limit: Limit bounds every ranked lens in the response. Default 10, maximum 100; a value at or below zero, or one that is not a number, takes the default.
Implementation
Future<Response> getEventTopWithHttpInfo({ String? range, String? start, String? end, int? limit, }) async {
// ignore: prefer_const_declarations
final path = r'/v1/event/top';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (range != null) {
queryParams.addAll(_queryParams('', 'range', range));
}
if (start != null) {
queryParams.addAll(_queryParams('', 'start', start));
}
if (end != null) {
queryParams.addAll(_queryParams('', 'end', end));
}
if (limit != null) {
queryParams.addAll(_queryParams('', 'limit', limit));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}