Get customer entitlement history
Changed onPre-release Endpoint This endpoint is currently in beta and is subject to change.
Get the balance and usage history of a metered entitlement. The queried range may span multiple usage periods.
windowed_history groups usage into windows of the requested size and reports the balance at the start of each window. burndown_history lists the periods in which grants were consumed in a fixed order, together with the usage taken from each grant.
Request
- Base URLhttps://global.api.konghq.com
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
- or HTTP bearer
Path parameters
ULID (Universally Unique Lexicographically Sortable Identifier).
ULID (Universally Unique Lexicographically Sortable Identifier).
Query parameters
The start of the queried range. Defaults to the last reset. Truncated to the minute. The range may span at most 1000 windows.
The end of the queried range. Defaults to the current time. Truncated to the minute unless it is the current time.
The meter query granularities the usage history can be grouped into. Sub-hour windows are too expensive to compute and monthly windows are not supported.
The size of the windows the usage is grouped into.
The IANA time zone the windows are aligned to.
Response
EntitlementHistory response.
Balance and usage history of a metered entitlement.
Usage in half-open windows of the requested size, aligned to the requested time zone. Empty windows are included; windows before usage measurement began are omitted.
Periods in which grants were consumed in a fixed order. A new segment starts whenever grant priorities change or a usage period starts.
Example response
{
"windowed_history": [
{
"period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"usage": "100",
"balance_at_start": "100"
}
],
"burndown_history": [
{
"period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"usage": "100",
"overage": "0",
"balance": {
"start": "100",
"end": "50"
},
"grant_balances": {
"start": {
"01G65Z755AFWAKHE12NY0CQ9FH": "100"
},
"end": {
"01G65Z755AFWAKHE12NY0CQ9FH": "50"
}
},
"grant_usages": [
{
"grant_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"usage": "50"
}
]
}
]
}Changes
- breaking
added to the
invalid_parameters/itemsresponse propertyoneOflist for the response status - warning
added the new
key_invalidenum value to theinvalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/ruleresponse property for the response status - warning
added the new
uniqueenum value to theinvalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/ruleresponse property for the response status
- breaking