Retrieves historical usage data for a customer’s metered feature.Documentation Index
Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
Use this file to discover all available pages before exploring further.
Usage history can now be retrieved regardless of whether the customer currently has an active subscription. Pass
includeInactiveSubscriptions: true when using the GraphQL API or GraphQL-based SDKs. The REST API supports this automatically — no extra parameter needed.Query
Parameters
Input parameters for usage history query
Return Type
Returns aUsageHistoryV2 object with:
| Field | Type | Description |
|---|---|---|
totalUsage | Float | Total usage in the period |
periods | [UsagePeriod] | Usage broken down by period |
markers | [UsageMarker] | Subscription usage reset timestamps. Only present when the customer has an active subscription. Use these to cross-reference raw usage data with entitlement reset boundaries. |
UsagePeriod Fields
| Field | Type | Description |
|---|---|---|
periodStart | DateTime | Period start time |
periodEnd | DateTime | Period end time |
usage | Float | Usage in this period |
UsageMarker Fields
| Field | Type | Description |
|---|---|---|
timestamp | DateTime | The point in time when the subscription’s usage was reset |
Common Use Cases
Usage analytics dashboard
Usage analytics dashboard
Build usage trend charts showing consumption over time, including for customers who no longer have an active subscription.
Billing reports
Billing reports
Generate usage reports for customer billing visibility.
Capacity planning
Capacity planning
Analyze usage patterns to predict future needs.
Cross-referencing usage with entitlement resets
Cross-referencing usage with entitlement resets
Use the
markers array to overlay subscription usage reset boundaries onto raw usage charts, making it easy to see exactly how much was consumed within each billing period.Example: Build Usage Chart
Related Operations
- Report Usage - Report usage
