组织

列出用量事件

按时间倒序逐页返回组织的用量事件,每条带费用与结算状态;逐计量项明细需按 id 查单条。

GET /organization/v1/events● 支持

官方参考 ↗

请求参数

  • starting_atstring必填

    query: 窗口开始(含),UTC ISO 8601,如 2026-09-26T00:00:00Z

  • ending_atstring必填

    query: 窗口结束(不含),UTC ISO 8601;距 starting_at 最多 93 天(费用明细导出无此限制)

  • limitinteger可选

    query: 每页条数,1–100,默认 25

  • pagestring可选

    query: 上一页响应里 next_page 给出的不透明游标,原样带回即可

返回

200 page

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

响应

HTTP 200

Event page

application/json

名称类型说明
objectstringObject type; always `page`.
dataarray<object>Usage events, newest first.
data[].objectstringObject type; always `usage.event`.
data[].idstringId of the usage event; pass it to getOrganizationEvent.
data[].occurred_atstringTime at which the usage happened, UTC.
data[].ServiceNamestringName of the platform service that produced the usage (the source service of the usage event).
data[].ServiceCategorystringCategory of the service; a service without a registered category reports its own name.
data[].ResourceIdstringId of the resource that the usage belongs to.
data[].ResourceNamestringDisplay name of the resource; falls back to ResourceId when no name is known.
data[].BilledCoststringAmount billed in USD as an exact decimal string; unsettled usage counts as 0 until it settles.
data[].BillingCurrencystringCurrency of BilledCost; always `USD`.
data[].ChargeClassstring | null`Correction` for an event that corrects an earlier charge (its BilledCost is negative); null for ordinary usage.
data[].request_idstring | nullX-Request-Id of the API call that produced the usage; null for usage that does not come from a request.
data[].settlementobjectHow the usage was charged: settlement state, any shortfall, and why nothing was charged.
data[].linesarray<object>Metering lines mapped from the billing measurements; the priced split (ListUnitPrice, PricingUnit, BilledCost) rides only GET /events/{id}.
has_morebooleanWhether more results exist beyond this page; request again with `page` set to `next_page` to read them.
next_pagestring | nullOpaque cursor for the next page; null on the last page. Pass it unchanged as `page`.

响应字段

字段说明
object固定 "page"
data[].object固定 "usage.event"
data[].id事件 id;查单条明细、对账都用它
data[].occurred_at事件发生时间(UTC)
data[].ServiceName / ServiceCategory / ResourceId / ResourceNameFOCUS 服务与资源列
data[].BilledCost / BillingCurrency事件费用(美元十进制字符串)与币种
data[].ChargeClass更正事件为 "Correction"(费用为负数),普通事件为 null
data[].request_id产生这次用量的那次 API 调用响应头 X-Request-Id 的值,可拿去调用日志里查同一次请求
data[].settlement.statussettled(已结算)/ unsettled(未结算)/ settled_with_shortfall(结算有缺口)/ no_asset(无计费资产,零费用)
data[].settlement.shortfall / data[].settlement.zero_reason结算缺口金额(十进制字符串或 null);零费用的原因(或 null)
has_more / next_page按发生时间倒序逐页;游标不透明,不重复、不遗漏

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