Querying a Task for Parsing SQL Details (by SQL Template ID)
Function
This API is used to query a task for parsing SQL details (by SQL template ID).
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:clouddba:fullSqlList
Read
Instance
-
-
-
URI
POST /v3/{project_id}/fullsql/tasks/query-by-sql-template-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 |
|---|---|---|---|
| instance_id | Yes | 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 |
| node_id | No | String | Definition Node ID Constraints N/A Range The value can contain 32 characters. Only letters and digits are supported. Default Value N/A |
| range_left | No | Long | Definition Left query interval of the start time and end time Constraints N/A Range N/A Default Value N/A |
| range_right | No | Long | Definition Right query interval of the start time and end time Constraints N/A Range N/A Default Value N/A |
| sql_template_id | Yes | String | Definition SQL template ID Constraints N/A Range N/A Default Value N/A |
| page_size | No | Integer | Definition Number of records on each page Constraints N/A Range N/A Default Value N/A |
| cur_page | No | Integer | Definition Current page number Constraints N/A Range N/A Default Value N/A |
Response Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| instance_id | Yes | 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 |
| node_id | No | String | Definition Node ID Constraints N/A Range The value can contain 32 characters. Only letters and digits are supported. Default Value N/A |
| range_left | No | Long | Definition Left query interval of the start time and end time Constraints N/A Range N/A Default Value N/A |
| range_right | No | Long | Definition Right query interval of the start time and end time Constraints N/A Range N/A Default Value N/A |
| create_at_left | No | Long | Definition Left query interval of the creation time Constraints N/A Range N/A Default Value N/A |
| create_at_right | No | Long | Definition Right query interval of the creation time Constraints N/A Range N/A Default Value N/A |
| user | No | String | Definition Username Constraints N/A Range N/A Default Value N/A |
| keyword | No | String | Definition Keyword Constraints N/A Range N/A Default Value N/A |
| db_name | No | String | Definition Database Constraints N/A Range N/A Default Value N/A |
| operation | No | String | Definition Operation Constraints N/A Range N/A Default Value N/A |
| thread_id | No | String | Definition Thread ID Constraints N/A Range N/A Default Value N/A |
| trx_id | No | String | Definition Transaction ID Constraints N/A Range N/A Default Value N/A |
| status | No | String | Definition Execution status
Constraints N/A Range N/A Default Value N/A |
| sql_template_id | No | String | Definition SQL template ID Constraints N/A Range N/A Default Value N/A |
| sort_field | No | String | Definition Sorting field Constraints N/A Range
Default Value N/A |
| asc | No | Boolean | Definition Sorting rule Constraints N/A Range
Default Value N/A |
| page_size | No | Integer | Definition Number of records on each page Constraints N/A Range N/A Default Value N/A |
| cur_page | No | Integer | Definition Current page number Constraints N/A Range N/A Default Value N/A |
Example Requests
POST https://das.cn-north-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/fullsql/tasks/query-by-sql-template-id
{
"instance_id": "17a73a23badb4c40b6ea48e7bfa5e83fin01",
"sql_template_id": "A696A388D716F3D4"
} 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