组织

导出费用明细

以 JSONL 流式导出一段时间内每条用量事件的费用明细,列名按 FOCUS 1.3;服务端按天分页,适合取超过 93 天的账。

GET /organization/v1/charges● 支持

官方参考 ↗

请求参数

  • starting_atstring必填

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

  • ending_atstring必填

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

返回

200

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

响应

HTTP 200

FOCUS 1.3 JSONL stream

application/x-ndjson

名称类型说明
ChargePeriodStartstringStart of the charge period (the event time), UTC.
ChargePeriodEndstringEnd of the charge period (the event time), UTC.
BilledCoststringAmount billed in USD as an exact decimal string; unsettled usage counts as 0 until it settles.
BillingCurrencystringCurrency of BilledCost; always `USD`.
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.
ConsumedQuantitystringQuantity consumed, an exact decimal string in ConsumedUnit.
ConsumedUnitstringUnit of ConsumedQuantity as reported by the metering line; quantities of different units are never added together.
ChargeCategorystringKind of charge.
ChargeClassstring | null`Correction` for an event that corrects an earlier charge (its BilledCost is negative); null for ordinary usage.
ChargeDescriptionstringText such as `<service>/<offering> usage` that says what was charged.
x_RequestIdstring | nullAlways null in the export; look up the request id of an event with getOrganizationEvent.
x_EventIdstringId of the usage event this record comes from; pass it to getOrganizationEvent.

响应字段

字段说明
ChargePeriodStart / ChargePeriodEnd计费周期起止(UTC)
BilledCost / BillingCurrency该事件费用(美元十进制字符串)与币种(USD)
ServiceName / ServiceCategory / ResourceId / ResourceNameFOCUS 服务与资源列
ConsumedQuantity / ConsumedUnit消耗数量与计量单位
ChargeCategoryUsage(用量)或 Adjustment(调整)
ChargeClass更正记录为 "Correction",普通记录为 null
ChargeDescription计量项的人类可读描述
x_RequestId / x_EventId产生这条记录的 API 调用的 X-Request-Id;对应的用量事件 id

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