Organization

Get a usage event

One usage event in full: usage, cost, settlement status and the transactions that paid it (x_Charges); a nonexistent id and another organization's id are indistinguishable — both answer 404.

GET /organization/v1/events/{id}● Supported

Official reference ↗

Request parameters

  • idstring必填

    path: The usage event id from the events list's data[].id

Returns

200 usage.event

Errors follow the problem+json format — see error codes

Response

HTTP 200

The usage event

application/json

NameTypeDescription
objectstringObject type; always `usage.event`.
idstringId of the usage event; pass it to getOrganizationEvent.
occurred_atstringTime at which the usage happened, UTC.
ServiceNamestringName of the platform service that produced the usage (the source service of the usage event).
ServiceCategorystringCategory of the service; a service without a registered category reports its own name.
ResourceIdstringId of the resource that the usage belongs to.
ResourceNamestringDisplay name of the resource; falls back to ResourceId when no name is known.
BilledCoststringAmount billed in USD as an exact decimal string; unsettled usage counts as 0 until it settles.
BillingCurrencystringCurrency of BilledCost; always `USD`.
ChargeClassstring | null`Correction` for an event that corrects an earlier charge (its BilledCost is negative); null for ordinary usage.
request_idstring | nullX-Request-Id of the API call that produced the usage; null for usage that does not come from a request.
settlementobjectHow the usage was charged: settlement state, any shortfall, and why nothing was charged.
settlement.statusstringSettlement state of the event.
settlement.shortfallstring | nullUSD amount that could not be charged, as a decimal string, when status is settled_with_shortfall; null otherwise.
settlement.zero_reasonstring | nullWhy nothing was charged for the event: `byok` when the caller used its own provider key; null when a charge applies.
linesarray<object>Priced lines of the event; their BilledCost values add up to the event's BilledCost.
lines[].meterstringKey of the meter that measured the line.
lines[].display_namestringEnglish label of the meter; falls back to the meter key in list pages.
lines[].ConsumedQuantitystringQuantity consumed, an exact decimal string in ConsumedUnit.
lines[].ConsumedUnitstringUnit of ConsumedQuantity as reported by the metering line; quantities of different units are never added together.
lines[].ListUnitPricestring | nullList price in USD per PricingUnit as a decimal string; null when the line is not priced.
lines[].PricingUnitstring | nullUnit that ListUnitPrice applies to; null when the line is not priced.
lines[].BilledCoststringAmount billed for this line in USD as a decimal string.
x_Chargesarray<object>The transactions that paid this event; their BilledCost sums to the event's BilledCost.
x_Charges[].transaction_idstringThe id of the billing transaction that paid part of this event.
x_Charges[].BilledCoststringAmount billed in USD as an exact decimal string; unsettled usage counts as 0 until it settles.
x_Charges[].BillingCurrencystringCurrency of BilledCost; always `USD`.
x_Charges[].sub_accountstringWhich balance the transaction was taken from.

Response fields

FieldDescription
object / id / occurred_atalways "usage.event", the event id, when it happened (UTC)
ServiceName / ServiceCategory / ResourceId / ResourceName / BilledCost / BillingCurrency / ChargeClass / request_id / settlementExactly the same fields the events list carries for this event
lines[].meter / lines[].display_nameThe meter's identifier and its English display name
lines[].ConsumedQuantity / ConsumedUnitThe line's consumed quantity and unit
lines[].ListUnitPrice / PricingUnitAlways null: an event is priced as a whole, so there is no per-line unit price
lines[].BilledCostThe line's cost, equal to the event's BilledCost
x_Charges[]The transactions that paid this event: transaction_id, BilledCost, BillingCurrency and sub_account (promotional balance or cash; promotional is taken first). They add up to the event's BilledCost

For the transactions behind one event see Get a usage event.