Initiates an SQL statement diagnostics request on an instance connected to DAS.

Before you call this operation, make sure that the following requirements are met:

  • If you use an SDK to call DAS, you must set the region to cn-shanghai.
  • This operation can be used in the following database services:
    • RDS MySQL
    • RDS PostgreSQL
    • RDS SQL Server
    • PolarDB for MySQL
    • PolarDB for PostgreSQL(Compatible with Oracle)
    • ApsaraDB for MongoDB
Note The minor engine version of an RDS for PostgreSQL instance is 20220130 or later. For more information, see Update the minor engine version of an RDS for PostgreSQL instance.

Request parameters


The operation that you want to perform. Set the value to CreateRequestDiagnosis.


The ID of the instance.


The ID of the node.

Note This parameter must be specified for cluster instances such as PolarDB for MySQL, PolarDB for PostgreSQL(Compatible with Oracle), and ApsaraDB for MongoDB.

The name of the database.

SqlStringYesselect * from test where name = 'mockUser'

The SQL statement to be diagnosed.

Response parameters


The returned HTTP status code.


The returned message.

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.

The unique ID of the diagnostic task. It is used to query the diagnosis result later.


The ID of the request.


Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.


Sample requests

&Sql=select * from test where name = 'mockUser'
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "Code" : "200",
  "Message" : "Successful",
  "Data" : "61820b594664275c4429****",
  "RequestId" : "800FBAF5-A539-5B97-A09E-C63AB2F7****",
  "Success" : "true"

Error codes

HttpCodeError codeError messageDescription
400InvalidParamsThe 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.