用于查询指定时间范围内的Tunnel数据传输服务相关详情数据。
接口说明
请求说明
本 API 支持查询包括 slot 使用量详情(
slot_usage_detail
)、吞吐量详情(throughput_detail
)和吞吐量汇总(throughput_summary
)等在内的多种 Tunnel 指标。quotaNickname
和project
参数不能同时为空。当
groupList
包含table
或ip
时,必须指定project
参数,并且在包含ip
时还需指定tableList
参数。orderColumn
支持maxValue
,minValue
,avgValue
和sumValue
(仅适用于throughput_summary
),默认为空表示不排序。ascOrder
默认为false
表示降序排列。limit
参数定义了返回结果的数量限制,默认值为 10,最大不超过 100。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
odps:QueryTunnelMetricDetail |
list |
*Tunnel
|
无 | 无 |
请求语法
POST /api/v1/observations/tunnel/{metric}/detail HTTP/1.1
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
startTime |
integer |
是 |
查询时间范围:开始时间。 |
1735534322 |
endTime |
integer |
是 |
查询时间范围:结束时间。 |
1735536322 |
metric |
string |
是 |
观测指标名称。 |
slot_usage_detail |
body |
object |
否 |
请求体参数。 |
|
quotaNickname |
string |
否 |
Tunnel 二级 Quota 昵称。 共享 Quota 昵称是:default 独享 Quota 昵称的格式是:quotaNickname#subQuotaNickname |
quota_A |
project |
string |
否 |
项目名称。 |
project_a |
tableList |
array |
否 |
表名称列表 归属于 project,因此如果 tableList 不为空,则 project 不为空。 |
|
string |
否 |
表名称 |
tab_name |
|
operationList |
array |
否 |
操作类型列表 |
|
string |
否 |
操作类型|包括: upload - Tunnel Batch 上传 download - Tunnel Batch 下载 stream_upload - Tunnel Stream 上传 max_storage_read - Storage API 下载 download_instance - Tunnel Instance 下载 upsert - Tunnel Upsert 上传 max_storage_write - Storage API 上传 table_preview - Preview 下载 |
upload |
|
groupList |
array |
否 |
分组依据列表 |
|
string |
否 |
分组依据。包括: quota project table operation ip (仅 metric 为 throughput_detail 时支持) |
quota |
|
orderColumn |
string |
否 |
排序列 |
maxValue |
ascOrder |
boolean |
否 |
是否升序 |
false |
limit |
integer |
否 |
查询的数量限制。默认是 10,最大 100。 |
10 |
slot_usage_detail
slot 使用量 TopN 详情数据
- 支持可选过滤参数:quotaNickname,project,tableList,operationList,groupList
quotaNickname 和 project 不能同时为空
orderColumn 只支持 maxValue,minValue 和 avgValue。默认为空,表示不排序
ascOrder 默认为 false,表示降序
limit 默认为 10,最大 100
- groupList 支持 quota,project,table,operation。
groupList 不能为空,表示数据的展示粒度。
throughput_detail
吞吐量 TopN 详情数据
- 支持可选过滤参数:quotaNickname,project,tableList,operationList,groupList
quotaNickname 和 project 不能同时为空
orderColumn 只支持 maxValue,minValue 和 avgValue。默认为空,表示不排序
ascOrder 默认为 false,表示降序
limit 默认为 10,最大 100
- groupList 支持 quota,project,table,ip,operation
groupList 不能为空,表示数据的展示粒度。
throughput_summary
吞吐量汇总
- 支持可选过滤参数:quotaNickname,project,tableList,operationList,groupList
quotaNickname 和 project 不能同时为空
orderColumn 只支持 sumValue。默认为空,表示不排序
ascOrder 默认为 false,表示降序
limit 默认为 10,最大 100
- groupList 支持 quota,project,table,operation
groupList 不能为空,表示数据的展示粒度。
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
PopResult |
||
requestId |
string |
请求 ID。 |
0a06dd4516687375802853481ec9fd |
httpCode |
integer |
返回的 HTTP 状态码。 |
200 |
errorCode |
string |
错误码。 |
OBJECT_NOT_EXIST |
errorMsg |
string |
错误信息。 |
plan \"***\" does not exist |
data |
object |
返回数据 |
|
name |
string |
观测指标名称。 |
tableA |
metrics |
array<object> |
指标值。 |
|
object |
指标值。 |
||
metric |
object |
指标元数据信息。 |
|
string |
元数据信息。其中,key 是分组依据,value 是对应的元数据。 |
"project":"prjName" |
|
value |
object |
指标数值信息 |
"avgValue":"11.5" |
示例
正常返回示例
JSON
格式
{
"requestId": "0a06dd4516687375802853481ec9fd",
"httpCode": 200,
"errorCode": "OBJECT_NOT_EXIST",
"errorMsg": "plan \\\"***\\\" does not exist",
"data": {
"name": "tableA",
"metrics": [
{
"metric": {
"key": "\"project\":\"prjName\""
},
"value": {
"test": "test",
"test2": 1
}
}
]
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。