getEventTimeseriesWithHttpInfo method
Timeseries returns the caller org's LLM usage over time as an evenly-spaced series.
Timeseries returns the caller org's LLM usage over time as an evenly-spaced series. One point per hour or per day — the bucket the window implies, 24h giving hours and 7d/30d giving days — carrying requests, total tokens and spend in cents. Empty buckets are filled with zeros so a client charts a continuous line. 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:
Implementation
Future<Response> getEventTimeseriesWithHttpInfo({ String? range, String? start, String? end, }) async {
// ignore: prefer_const_declarations
final path = r'/v1/event/timeseries';
// 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));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}