组织

查询费用

按时间桶返回组织已入账的费用,可按 FOCUS 列分组;金额是美元十进制字符串,含待结算用量的桶会标 estimated。

GET /organization/v1/costs● 支持

官方参考 ↗

请求参数

  • starting_atstring必填

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

  • ending_atstring必填

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

  • bucket_widthstring必填

    query: 时间桶宽度:1h(整点对齐)或 1d(自然日对齐),一律 UTC

    取值 1h1d
  • time_zonestring可选
    默认 "UTC"

    query: IANA time zone name (for example Asia/Shanghai) whose local hours or days form the buckets. Defaults to UTC. Offsets such as +08:00 are rejected. The window widens to whole local buckets; a day that crosses a daylight-saving change lasts 23 or 25 hours. starting_at and ending_at stay UTC instants.

  • group_byarray可选

    query: 分组列,可重复:ServiceName、ServiceCategory、ResourceId、ConsumedUnit;查询用量时 ConsumedUnit 恒被服务端拆出

  • pagestring可选

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

返回

200 page

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

响应

HTTP 200

Cost page

application/json

名称类型说明
objectstringObject type; always `page`.
dataarray<object>Cost buckets in time order, one per hour or day of the requested window.
data[].objectstringObject type; always `bucket`.
data[].starting_atstringStart of the bucket, UTC, inclusive.
data[].ending_atstringEnd of the bucket, UTC, exclusive.
data[].estimatedbooleanTrue when at least one contributing event is not settled yet, so the amounts can still change.
data[].resultsarray<object>Aggregates of the bucket, one entry per group requested with group_by.
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固定 "bucket"
data[].starting_at / data[].ending_at桶的起止时间(UTC,整点或自然日对齐)
data[].estimatedtrue 表示该桶含尚未结算的用量,金额之后可能变化
data[].results[].ServiceName产生用量的服务名(仅在请求 group_by 含 ServiceName 时出现)
data[].results[].ServiceCategoryFOCUS 服务类别(仅按请求出现)
data[].results[].ResourceId / data[].results[].ResourceName资源 ID 与显示名;ResourceName 随 ResourceId 附带,解析不到显示名时等于 ResourceId
data[].results[].BilledCost该桶该组的费用,美元十进制字符串
data[].results[].BillingCurrency固定 "USD"
has_more / next_page是否还有下一页;下一页的不透明游标(null 表示没有更多)

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