getUsageAnalyticsWithHttpInfo method
Is the entitlement-GATED per-provider breakdown of the caller org's LLM usage — the paid lens over the same warehouse ledger GET /v1/usage/summary reads its totals from.
Is the entitlement-GATED per-provider breakdown of the caller org's LLM usage — the paid lens over the same warehouse ledger GET /v1/usage/summary reads its totals from. Basic own-org usage stays ungated at /v1/usage/summary. A plan that does not grant the analytics datastore is refused with 402, and an unresolvable plan fails closed to the free floor, which does not grant it. The window is clamped forward to the plan's retention entitlement, so a tenant can never read older than its plan allows even with a custom start. The response is marked no-store. INTERIM (mirrors apps/world's limits echo): no org→plan resolver exists in cloud yet — the subscription lookup is owned by the billing plane and the gateway principal carries no plan claim — so the caller passes the plan and the gate resolves THAT plan's access.
Note: This method returns the HTTP Response.
Parameters:
-
String end: End is the exclusive window end, RFC3339. Read only when Range is custom.
-
String plan: Plan is the plan id whose entitlement decides access and retention. INTERIM: cloud has no org-to-plan resolver yet, so the caller names the plan; when that resolver lands this becomes the caller org's own plan.
-
String range: Range is the window: a count and a unit — 24h, 7d, 90d, any
-
String start: Start is the inclusive window start, RFC3339. Read only when Range is custom, and clamped forward to the plan's retention floor.
Implementation
Future<Response> getUsageAnalyticsWithHttpInfo({ String? end, String? plan, String? range, String? start, }) async {
// ignore: prefer_const_declarations
final path = r'/v1/usage/analytics';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (end != null) {
queryParams.addAll(_queryParams('', 'end', end));
}
if (plan != null) {
queryParams.addAll(_queryParams('', 'plan', plan));
}
if (range != null) {
queryParams.addAll(_queryParams('', 'range', range));
}
if (start != null) {
queryParams.addAll(_queryParams('', 'start', start));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}