组织

查看单个用量事件

返回一个用量事件的完整明细:逐计量项费用、单价与结算状态;不存在的 id 与别的组织的事件同样返回 404。

GET /organization/v1/events/{id}● 支持

官方参考 ↗

请求参数

  • idstring必填

    path: 用量事件 id,来自用量事件列表的 data[].id

返回

200 usage.event

错误按 problem+json 格式返回,参见 错误码

响应

HTTP 200

The usage event

application/json

名称类型说明
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.

响应字段

字段说明
object / id / occurred_at固定 "usage.event"、事件 id、发生时间(UTC)
ServiceName / ServiceCategory / ResourceId / ResourceName / BilledCost / BillingCurrency / ChargeClass / request_id / settlement与用量事件列表中同一事件完全相同的字段
lines[].meter / lines[].display_name计量项标识与其英文显示名
lines[].ConsumedQuantity / ConsumedUnit该计量项的消耗数量与单位
lines[].ListUnitPrice / PricingUnit官方单价与计价单位(未公布时为 null)
lines[].BilledCost该计量项的费用;各项之和等于事件的 BilledCost

单条明细的逐计量项拆分见查看单个用量事件。