Viewing the Creation Records of Tasks for Parsing SQL Details
Function
This API is used to view the creation records of tasks for parsing SQL details.
Authorization Information
Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions Policies and Supported Actions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
das::showCloudDBAInfo
Read
-
-
-
-
URI
GET /v3/{project_id}/fullsql/task/query-by-task-id
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints N/A Range The value can contain 32 characters. Only letters and digits are supported. Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| task_id | Yes | String | Definition Task ID Constraints N/A Range N/A Default Value N/A |
| cur_page | No | Integer | Definition Page number Constraints N/A Range N/A Default Value N/A |
| per_page | No | Integer | Definition Number of records on each page Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Definition Total number Range N/A |
| tasks | Arrays of objects in Table 4 | Definition SQL Insights task details Range N/A |
| Parameter | Type | Description |
|---|---|---|
| id | Long | Definition Task ID Constraints N/A Range N/A Default Value N/A |
| instance_id | String | Definition Unique ID of an instance Constraints N/A Range The value can contain 32 characters. Only letters and digits are supported. Default Value N/A |
| instance_name | String | Definition Instance name Constraints N/A Range N/A Default Value N/A |
| node_id | String | Definition Unique ID of a node Constraints N/A Range The value can contain 32 characters. Only letters and digits are supported. Default Value N/A |
| start_at | Long | Definition Start time in the Unix timestamp format, in milliseconds Constraints N/A Range [0, 2^31 – 1]. The actual value depends on the query result. Default Value N/A |
| end_at | Long | Definition End time in the Unix timestamp format, in milliseconds Constraints N/A Range [0, 2^31 – 1]. The actual value depends on the query result. Default Value N/A |
| batch_id | String | Definition Batch ID Constraints N/A Range N/A Default Value N/A |
| user_list | String | Definition Username Constraints Multiple values need to be separated by commas (,). Range N/A Default Value N/A |
| keyword | String | Definition Keyword Constraints Multiple values need to be separated by commas (,). Range N/A Default Value N/A |
| db_list | String | Definition Database Constraints Multiple values need to be separated by commas (,). Range N/A Default Value N/A |
| operation_list | String | Definition Operation type Constraints Multiple values need to be separated by commas (,). Range N/A Default Value N/A |
| thread_id_list | String | Definition Thread ID Constraints Multiple values need to be separated by commas (,). Range N/A Default Value N/A |
| trx_id_list | String | Definition Transaction ID Constraints Multiple values need to be separated by commas (,). Range N/A Default Value N/A |
| status_list | String | Definition Execution status Constraints Multiple values need to be separated by commas (,). Range
Default Value N/A |
| sql_template_ids | String | Definition SQL template ID Constraints Multiple values need to be separated by commas (,). Range N/A Default Value N/A |
| status | Integer | Definition Task status Constraints N/A Range N/A Default Value N/A |
| progress | Double | Definition Task progress Constraints N/A Range N/A Default Value N/A |
| reason | String | Definition Failure cause Constraints N/A Range N/A Default Value N/A |
Example Requests
GET https://das.cn-north-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/fullsql/task/queryByTaskId?task_id=123
Example Responses
Status code: 200
Success.
{
"tasks": [
{
"id": 1627,
"instance_id": "17a73a23badb4c40b6ea48e7bfa5e83fin01",
"instance_name": "test",
"start_at": 1763540775000,
"end_at": 1763627175000,
"batch_id": "4db1909ad07146a6b8f9f4f68a51b025",
"status": 2,
"create_at": 1763717186178
}
],
"total": 1
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Success. |
| 400 | Client error. |
| 500 | Server error. |
Error Codes
See Error Codes.
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