Initiates an SQL statement diagnostic request on an instance connected to DAS.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateRequestDiagnosis |
The operation that you want to perform. Set the value to CreateRequestDiagnosis. |
InstanceId | String | No | rm-0iwhhl8gx0ld6**** |
The ID of the instance. |
NodeId | String | No | 202**** |
The ID of the node. Note For cluster instances that run engines such as MongoDB, you must provide the node
ID.
|
Database | String | No | das |
The name of the database. |
Sql | String | No | select * from test where name = 'mockUser' |
The SQL statement to be diagnosed. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | 200 |
The returned HTTP status code. |
Message | String | Successful |
The returned message. Note If the request is successful, Successful is returned. If the request fails, an error
message that includes an error code is returned.
|
Data | String | 61820b594664275c4429**** |
The unique ID of the diagnostic task. It is used to query the diagnosis result later. |
RequestId | String | 800FBAF5-A539-5B97-A09E-C63AB2F7**** |
The ID of the request. |
Success | String | true |
Indicates whether the request is successful. Valid values:
|
Examples
Sample requests
http(s)://das.cn-shanghai.aliyuncs.com/?Action=CreateRequestDiagnosis
&InstanceId=rm-0iwhhl8gx0ld6****
&NodeId=202****
&Database=das
&Sql=select * from test where name = 'mockUser'
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateRequestDiagnosisResponse>
<Code>200</Code>
<Message>Successful</Message>
<Data>61820b594664275c4429****</Data>
<RequestId>800FBAF5-A539-5B97-A09E-C63AB2F7****</RequestId>
<Success>true</Success>
</CreateRequestDiagnosisResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Code" : "200",
"Message" : "Successful",
"Data" : "61820b594664275c4429****",
"RequestId" : "800FBAF5-A539-5B97-A09E-C63AB2F7****",
"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.