Asynchronously queries the IDs of SQL queries that generate the specified MySQL error code in the SQL Explorer results of a database instance.
- This API operation supports only ApsaraDB RDS for MySQL instances and PolarDB for MySQL clusters for which DAS Professional Edition is enabled. For more information, see Purchase DAS Professional Edition.
- If you use an SDK to call Database Autonomy Service (DAS), you must set the region to cn-shanghai.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetAsyncErrorRequestListByCode |
The operation that you want to perform. Set the value to GetAsyncErrorRequestListByCode. |
InstanceId | String | Yes | rm-2ze8g2am97624**** |
The ID of the instance. |
NodeId | String | No | pi-wz9s658475e58**** |
The ID of the node. Note This parameter is required for PolarDB for MySQL clusters.
|
Start | Long | No | 1642556990714 |
The beginning of the time range to query. Specify the time in the UNIX timestamp format. Unit: milliseconds. Note The start time can be up to 90 days earlier than the current time.
|
End | Long | No | 1642566830000 |
The end of the time range to query. Specify the time in the UNIX timestamp format. Unit: milliseconds. Note The end time must be later than the start time. The interval cannot exceed 24 hours.
|
ErrorCode | String | No | 1064 |
The error code. You can call the GetAsyncErrorRequestStatByCode operation to query the MySQL error codes that can be generated in the SQL Explorer results of an instance. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | Long | 200 |
The returned HTTP status code. |
Message | String | Successful |
The message that is returned for the request. Note If the request is successful, Successful is returned. If the request fails, an error message that contains information such
as an error code is returned.
|
Data | Object |
The returned data. |
|
fail | Boolean | false |
Indicates whether the asynchronous request failed. Valid values:
|
result | Array of list |
The IDs of SQL queries that generate the specified MySQL error code. |
|
sqlId | String | ad78a4e7d3ce81590c9dc2d5f4bc**** |
The ID of the SQL query. |
instanceId | String | rm-2ze8g2am97624**** |
The ID of the instance. |
resultId | String | async__c39d43ece52d35267cc4b92a0c26**** |
The ID of the asynchronous request. |
isFinish | Boolean | true |
Indicates whether the asynchronous request is complete.
|
state | String | SUCCESS |
The state of the asynchronous request.
|
complete | Boolean | true |
Indicates whether the asynchronous request is complete. Valid values:
|
timestamp | Long | 1644559407740 |
The time when the asynchronous request was made. The value of this parameter is a UNIX timestamp. Unit: milliseconds. |
RequestId | String | 9CB97BC4-6479-55D0-B9D0-EA925AFE**** |
The ID of the request. |
Success | Boolean | true |
Indicates whether the request is successful. Valid values:
|
Examples
Sample requests
http(s)://das.cn-shanghai.aliyuncs.com/?Action=GetAsyncErrorRequestListByCode
&InstanceId=rm-2ze8g2am97624****
&Start=1642556990714
&End=1642566830000
&ErrorCode=1064
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetAsyncErrorRequestListByCodeResponse>
<Code>200</Code>
<Message>Successful</Message>
<Data>
<fail>false</fail>
<result>
<sqlId>ad78a4e7d3ce81590c9dc2d5f4bc****</sqlId>
<instanceId>rm-2ze8g2am97624****</instanceId>
</result>
<resultId>async__c39d43ece52d35267cc4b92a0c26****</resultId>
<isFinish>true</isFinish>
<state>SUCCESS</state>
<complete>true</complete>
<timestamp>1644559407740</timestamp>
</Data>
<RequestId>9CB97BC4-6479-55D0-B9D0-EA925AFE****</RequestId>
<Success>true</Success>
</GetAsyncErrorRequestListByCodeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Code" : 200,
"Message" : "Successful",
"Data" : {
"fail" : false,
"result" : {
"sqlId" : "ad78a4e7d3ce81590c9dc2d5f4bc****",
"instanceId" : "rm-2ze8g2am97624****"
},
"resultId" : "async__c39d43ece52d35267cc4b92a0c26****",
"isFinish" : true,
"state" : "SUCCESS",
"complete" : true,
"timestamp" : 1644559407740
},
"RequestId" : "9CB97BC4-6479-55D0-B9D0-EA925AFE****",
"Success" : true
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParams | The request parameters are invalid. | The error message returned because the specified request parameters are invalid. |
For a list of error codes, visit the API Error Center.