Queries the details of the SQL statements that are involved in an SQL review ticket.
Operation description
For more information about the SQL review feature, see SQL review.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dms:ListSQLReviewOriginSQL | list | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
OrderId | long | Yes | The ID of the SQL review ticket. You can call the CreateSQLReviewOrder operation to query the ticket ID. | 123321 |
OrderActionDetail | object | No | The parameters that are used to filter SQL statements involved in the ticket. | |
FileId | long | No | The ID of the file that contains the SQL statements to be reviewed. | 123345 |
SQLReviewResult | string | No | The optimization suggestion for the SQL statement. Valid values:
| MUST_IMPROVE |
CheckStatusResult | string | No | The review status of the SQL statement. Valid values:
| check_not_pass |
Page | object | No | The pagination information. | |
PageNumber | integer | No | The page number. | 1 |
PageSize | integer | No | The number of entries per page. | 20 |
Tid | long | No | The tenant ID. You can call the GetUserActiveTenant or ListUserTenants operation to query the tenant ID. | 1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
"ErrorCode": "UnknownError",
"ErrorMessage": "UnknownError",
"Success": true,
"TotalCount": 10,
"OriginSQLList": [
{
"SQLId": 1111,
"FileId": 123321,
"FileName": "test.sql",
"SQLContent": "select id from table_name",
"CheckStatus": "check_pass",
"StatusDesc": "passed the test",
"CheckedTime": "2021-06-09 21:07:00",
"SqlHash": "95adb6e77a0884d9e50232cb8c5c969d",
"ReviewSummary": "{\"POTENTIAL_ISSUE\":1,\"SUGGEST_IMPROVE\":1}",
"SQLReviewQueryKey": "a57e54ec5433475ea3082d882fdb89c5",
"SQLName": "getByPk"
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|