Queries detailed data for the Tunnel Data Transmission Service within a specified time range.
Operation description
This operation queries various Tunnel metrics, such as slot usage details (
slot_usage_detail), throughput details (throughput_detail), and a throughput summary (throughput_summary).The
quotaNicknameandprojectparameters cannot both be empty.If the groupList parameter contains
tableorip, you must specify theprojectparameter. If thegroupListparameter containsip, you must also specify thetableListparameter.The orderColumn parameter can be set to
maxValue,minValue,avgValue, orsumValue. ThesumValueoption is valid only forthroughput_summary. By default, this parameter is empty, which means that no sorting is performed.The default value of the
ascOrderparameter isfalse, which indicates that the results are sorted in descending order.The
limitparameter specifies the maximum number of entries to return. The default value is 10, and the maximum value is 100.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
odps:QueryTunnelMetricDetail | list | *Tunnel
| None | None |
Request syntax
POST /api/v1/observations/tunnel/{metric}/detail HTTP/1.1Request parameters
Parameter | Type | Required | Description | Example |
startTime | integer | Yes | The start of the time range to query. | 1735534322 |
endTime | integer | Yes | The end of the time range to query. | 1735536322 |
metric | string | Yes | The name of the metric. Valid values:
| slot_usage_detail |
| body | object | No | The request body parameters. | |
quotaNickname | string | No | The nickname of the level-2 quota for the tunnel. The nickname of the shared quota is default. The nickname of the exclusive quota is in the quotaNickname#subQuotaNickname format. | quota_A |
project | string | No | The name of the project. | project_a |
| tableList | array | No | The list of table names. The tables belong to a project. Therefore, if tableList is not empty, project cannot be empty. | |
string | No | The name of the table. | tab_name | |
| operationList | array | No | The list of operation types. | |
string | No | The operation type. Valid values: upload: Tunnel Batch upload download: Tunnel Batch download stream_upload: Tunnel Stream upload max_storage_read: Storage API download download_instance: Tunnel Instance download upsert: Tunnel Upsert upload max_storage_write: Storage API upload table_preview: Preview download | upload | |
| groupList | array | No | The list of grouping bases. | |
string | No | The grouping basis. Valid values: quota project table operation ip (supported only when metric is set to throughput_detail) | quota | |
orderColumn | string | No | The column to sort by. Valid values:
| maxValue |
ascOrder | boolean | No | Specifies whether to sort the results in ascending order. | false |
limit | integer | No | The maximum number of entries to return. The default value is 10. The maximum value is 100. | 10 |
Response elements
Element | Type | Description | Example |
object | PopResult | ||
requestId | string | The request ID. | 0a06dd4516687375802853481ec9fd |
httpCode | integer | The HTTP status code returned. | 200 |
errorCode | string | The error code. | OBJECT_NOT_EXIST |
errorMsg | string | The error message. | plan \"***\" does not exist |
| data | object | The returned data. | |
name | string | The name of the metric. | tableA |
| metrics | array<object> | The metric values. | |
object | The metric value. | ||
| metric | object | The metadata of the metric. | |
string | The metadata. The key is the grouping basis, and the value is the corresponding metadata. | "project":"prjName" | |
value | object | The numeric information of the metric. | "avgValue":"11.5" |
Examples
Success response
JSON format
{
"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
}
}
]
}
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.