组织
列出用量事件
按时间倒序逐页返回组织的用量事件,每条带费用与结算状态;逐计量项明细需按 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
| 名称 | 类型 | 说明 |
|---|---|---|
| object | string | Object type; always `page`. |
| data | array<object> | Usage events, newest first. |
| data[].object | string | Object type; always `usage.event`. |
| data[].id | string | Id of the usage event; pass it to getOrganizationEvent. |
| data[].occurred_at | string | Time at which the usage happened, UTC. |
| data[].ServiceName | string | Name of the platform service that produced the usage (the source service of the usage event). |
| data[].ServiceCategory | string | Category of the service; a service without a registered category reports its own name. |
| data[].ResourceId | string | Id of the resource that the usage belongs to. |
| data[].ResourceName | string | Display name of the resource; falls back to ResourceId when no name is known. |
| data[].BilledCost | string | Amount billed in USD as an exact decimal string; unsettled usage counts as 0 until it settles. |
| data[].BillingCurrency | string | Currency of BilledCost; always `USD`. |
| data[].ChargeClass | string | null | `Correction` for an event that corrects an earlier charge (its BilledCost is negative); null for ordinary usage. |
| data[].request_id | string | null | X-Request-Id of the API call that produced the usage; null for usage that does not come from a request. |
| data[].settlement | object | How the usage was charged: settlement state, any shortfall, and why nothing was charged. |
| data[].lines | array<object> | Metering lines mapped from the billing measurements; the priced split (ListUnitPrice, PricingUnit, BilledCost) rides only GET /events/{id}. |
| has_more | boolean | Whether more results exist beyond this page; request again with `page` set to `next_page` to read them. |
| next_page | string | null | Opaque 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 / ResourceName | FOCUS 服务与资源列 |
data[].BilledCost / BillingCurrency | 事件费用(美元十进制字符串)与币种 |
data[].ChargeClass | 更正事件为 "Correction"(费用为负数),普通事件为 null |
data[].request_id | 产生这次用量的那次 API 调用响应头 X-Request-Id 的值,可拿去调用日志里查同一次请求 |
data[].settlement.status | settled(已结算)/ unsettled(未结算)/ settled_with_shortfall(结算有缺口)/ no_asset(无计费资产,零费用) |
data[].settlement.shortfall / data[].settlement.zero_reason | 结算缺口金额(十进制字符串或 null);零费用的原因(或 null) |
has_more / next_page | 按发生时间倒序逐页;游标不透明,不重复、不遗漏 |
单条明细的逐计量项拆分见查看单个用量事件。