组织
导出费用明细
以 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
| 名称 | 类型 | 说明 |
|---|---|---|
| ChargePeriodStart | string | Start of the charge period (the event time), UTC. |
| ChargePeriodEnd | string | End of the charge period (the event time), UTC. |
| BilledCost | string | Amount billed in USD as an exact decimal string; unsettled usage counts as 0 until it settles. |
| BillingCurrency | string | Currency of BilledCost; always `USD`. |
| ServiceName | string | Name of the platform service that produced the usage (the source service of the usage event). |
| ServiceCategory | string | Category of the service; a service without a registered category reports its own name. |
| ResourceId | string | Id of the resource that the usage belongs to. |
| ResourceName | string | Display name of the resource; falls back to ResourceId when no name is known. |
| ConsumedQuantity | string | Quantity consumed, an exact decimal string in ConsumedUnit. |
| ConsumedUnit | string | Unit of ConsumedQuantity as reported by the metering line; quantities of different units are never added together. |
| ChargeCategory | string | Kind of charge. |
| ChargeClass | string | null | `Correction` for an event that corrects an earlier charge (its BilledCost is negative); null for ordinary usage. |
| ChargeDescription | string | Text such as `<service>/<offering> usage` that says what was charged. |
| x_RequestId | string | null | Always null in the export; look up the request id of an event with getOrganizationEvent. |
| x_EventId | string | Id of the usage event this record comes from; pass it to getOrganizationEvent. |
响应字段
| 字段 | 说明 |
|---|---|
ChargePeriodStart / ChargePeriodEnd | 计费周期起止(UTC) |
BilledCost / BillingCurrency | 该事件费用(美元十进制字符串)与币种(USD) |
ServiceName / ServiceCategory / ResourceId / ResourceName | FOCUS 服务与资源列 |
ConsumedQuantity / ConsumedUnit | 消耗数量与计量单位 |
ChargeCategory | Usage(用量)或 Adjustment(调整) |
ChargeClass | 更正记录为 "Correction",普通记录为 null |
ChargeDescription | 计量项的人类可读描述 |
x_RequestId / x_EventId | 产生这条记录的 API 调用的 X-Request-Id;对应的用量事件 id |
单条明细的逐计量项拆分见查看单个用量事件。