Viewing the Monitoring Details of a Statement
Function
This API is used to query statement monitoring details.
This API is synchronous. There are no accompanying APIs or specific scenarios.
Calling Method
For details, see Calling APIs.
URI
GET /v2/workspaces/{workspace_id}/aura-sessions/{session_id}/statements/{statement_id}/query-metrics
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| workspace_id | Yes | String | Definition: Workspace ID. For details about how to obtain the workspace ID, see Obtaining a Workspace ID. Constraints: N/A Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A |
| session_id | Yes | String | Definition: Session ID. You can obtain the session ID by calling the Listing Sessions API. Constraints: N/A Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. Default Value: N/A |
| statement_id | Yes | String | Definition: Statement ID, which can be obtained by calling the Viewing SQL Execution Records Under a Specified Session API. Constraints: N/A Range: 1 to 36 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Default Value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition: User token. It is obtained by calling the Obtaining an IAM User Token API. Constraints: N/A Range: N/A Default Value: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| [items] | Array of StatementQueryMetrics objects | Definition: Statement monitoring details. |
| Parameter | Type | Description |
|---|---|---|
| session_id | String | Definition: Session ID. Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed. |
| statement_id | String | Definition: Statement ID. Range: 1 to 36 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
| start_time | String | Definition: Statement start time, in ISO 8601 standard format. For example, 2026-06-13T03:32:39.386Z. Range: N/A |
| duration | Long | Definition: Statement running duration, in milliseconds. Range: N/A |
| schema_name | String | Definition: Schema name during statement execution. Range: N/A |
| query | String | Definition: Query statement. Range: N/A |
| query_plan | String | Definition: Statement plan information. Range: N/A |
| estimate_total_time | Long | Definition: Estimated statement running duration, in milliseconds. Range: N/A |
| estimate_left_time | Long | Definition: Estimated remaining statement duration, in milliseconds. Range: N/A |
| startup_coordinator_duration | Long | Definition: Startup duration of the coordinator node (CN), in milliseconds. Range: N/A |
| create_session_duration | Long | Definition: Session creation duration, in milliseconds. Range: N/A |
| enqueue_statement_duration | Long | Definition: Statement queue wait duration, in milliseconds. Range: N/A |
| queue_duration | Long | Definition: Statement queuing duration, in milliseconds. Range: N/A |
| write_resultset_duration | Long | Definition: Statement result set write duration, in milliseconds. Range: N/A |
| parse_time | Long | Definition: Pre-execution parsing time, in milliseconds. Range: N/A |
| estimate_memory | Integer | Definition: Estimated used memory, in MB. Range: N/A |
| status | String | Definition: Statement status in the Workload Manager (WLM). Range: N/A |
| error_info | String | Definition: Statement error information. Range: N/A |
| dn_time_skew_percent | Integer | Definition: Time skew percentage of data nodes (DNs), in %. Range: N/A |
| dn_max_peak_memory | Integer | Definition: Maximum peak memory of data nodes (DNs), in MB. Range: N/A |
| dn_average_peak_memory | Integer | Definition: Average peak memory of data nodes (DNs), in MB. Range: N/A |
| dn_spill_skew_percent | Integer | Definition: Spill skew rate of data nodes (DNs), in %. Range: N/A |
| dn_write_disk_total_size | Long | Definition: Total spill size of data nodes (DNs), in MB. Range: N/A |
| dn_spill_obs_total_size | Long | Definition: Total OBS spill size of data nodes (DNs), in MB. Range: N/A |
| cn_spill_obs_size | Long | Definition: OBS spill size of the coordinator node (CN), in MB. Range: N/A |
| disk_cache_hit_ratio | Number | Definition: Disk cache hit ratio (decimal, range 0 to 1. For example, 0.85 indicates an 85% hit rate). Range: 0 to 1. |
| obs_io_req_avg_latency | Long | Definition: Average latency of OBS I/O requests, in microseconds. Range: N/A |
| obs_io_req_latency_gt_1s | Long | Definition: Number of OBS I/O requests with latency greater than 1 second. Range: N/A |
| obs_io_req_latency_gt_10s | Long | Definition: Number of OBS I/O requests with latency greater than 10 seconds. Range: N/A |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Status code: 408
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Range: 8 to 36 characters. |
| error_msg | String | Definition: Error description. Range: 2 to 4,096 characters. |
| solution_msg | String | Definition: Solution description. Range: 2 to 4,096 characters. |
Example Requests
Query statement monitoring details.
GET /v2/workspaces/{workspace_id}/aura-sessions/{session_id}/statements/{statement_id}/query-metrics Example Responses
Status code: 200
[ {
"session_id" : "019ebf09-9043-7712-b2f5-457c448921da",
"statement_id" : "019ebf09-ed4d-7cfe-a577-c752b9a9962c",
"start_time" : "2026-06-13T03:32:39.386Z",
"duration" : 30168,
"estimate_total_time" : 35000,
"estimate_left_time" : 4832,
"schema_name" : "default_db",
"query" : "SELECT write_to_file1212('/work_dir/actor_share/019ebf09-9043-7712-b2f5-457c448921da/1234.txt','***') WITH ARGUMENTS(cpu=0.33, memory=128);",
"query_plan" : "",
"startup_coordinator_duration" : 531,
"create_session_duration" : 12,
"enqueue_statement_duration" : 0,
"queue_duration" : 0,
"write_resultset_duration" : 0,
"parse_time" : 76,
"estimate_memory" : 4096,
"status" : "SUCCESSFUL",
"error_info" : "",
"dn_time_skew_percent" : 0,
"dn_max_peak_memory" : 0,
"dn_average_peak_memory" : 0,
"dn_spill_skew_percent" : 0,
"dn_write_disk_total_size" : 0,
"dn_spill_obs_total_size" : 0,
"cn_spill_obs_size" : 0,
"disk_cache_hit_ratio" : 0,
"obs_io_req_avg_latency" : 0,
"obs_io_req_latency_gt_1s" : 0,
"obs_io_req_latency_gt_10s" : 0
} ] Status code: 400
{
"error_code" : "AIDataLake.00092031",
"error_msg" : "Invalid parameter name",
"solution_msg" : "Please enter parameters in the correct format."
} Status code: 401
{
"error_code" : "APIG.1002",
"error_msg" : "Incorrect token or token resolution failed.",
"solution_msg" : "Please obtain a valid token and retry."
} Status code: 403
{
"error_code" : "AIDataLake.00090030",
"error_msg" : "Unauthorized requests.",
"solution_msg" : "Check permissions and retry after authorization."
} Status code: 404
{
"error_code" : "AIDataLake.00090009",
"error_msg" : "The resource does not exists.",
"solution_msg" : "Please try to use correct info."
} Status code: 408
{
"error_code" : "common.00000408",
"error_msg" : "A timeout exception occurred.",
"solution_msg" : "The request timed out while waiting for a response — check the backend service status and network, then retry; if the operation is long-running, increase the client timeout or split the request."
} Status code: 500
{
"error_code" : "common.00000500",
"error_msg" : "internal error",
"solution_msg" : "An internal service error occurred. Please retry later; if the problem persists, contact technical support."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
| 400 | Invalid request. |
| 401 | Unauthorized. |
| 403 | Request denied. |
| 404 | The requested resource could not be found. |
| 408 | Request timeout. |
| 500 | Internal server error. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot