跳到导航

获取工作区费用使用情况

返回按成本计费的工作区随时间变化的使用成本。使用量按 UTC 天分桶。响应采用表格结构,包含 columns、column_types、column_units 和 rows,每个分组和分桶对应一行。total_cost 表示以工作区货币计的成本,total_charge_count 表示计费数量。最多可按 user_id、hashed_xi_api_key、region、reporting_workspace_id、billing_group_id、product_type、surface 和 actor 中的两个字段分组或筛选;按其中两个字段分组时,必须对其中一个字段使用 eq 或 in 筛选条件。始终可以添加 model、request_source、fiat_charge_type 和 fiat_currency。某些 id 列还会在现有列后附加显示名称列,例如 user_label。按积分计费的工作区应使用 /v1/workspace/analytics/query/usage-by-product-over-time。

请求头

xi-api-keystring可选

请求

This endpoint expects an object.
start_timeinteger必需>=1577836800000

时间范围起点,以毫秒 Unix 时间戳表示。不得早于 2020-01-01。

end_timeinteger必需>=1577836800000

时间范围结束时间,以毫秒级 Unix 时间戳表示。不得早于 2020-01-01。

interval_secondsinteger必需>=86400

以整 UTC 天为单位的分桶大小(秒)。每日分桶传入 86400;每周分桶传入 604800,周一开始。

group_bylist of enums or null可选
filterslist of objects or null可选

响应

成功响应

columnslist of strings
column_typeslist of enums
rowslist of lists of nullable strings or integers or doubles or booleans
column_unitslist of nullable enums

错误

422
Unprocessable Entity Error