Call the CreateSQLReviewOrder to create an SQL audit job.
For more instructions on this feature, see SQL audit .
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateSQLReviewOrder |
The parameters specified by the system. Valid values: CreateSQLReviewOrder . |
| Comment | String | Yes | test |
Business background, describe the cause or goal of the task to reduce communication costs. |
| RelatedUserList | Array of Long | No | 123443 |
The related person ID. |
| Param | Object | Yes |
The parameters of the ticket. |
|
| ProjectName | String | Yes | Xxx business SQL audit |
The name of the project. |
| DbId | Long | Yes | 123321 |
Database ID, callable SearchDatabases Interface acquisition. Note Currently, only physical libraries are supported, but not logical libraries.
|
| AttachmentKeyList | Array of String | Yes | upload_xxxx.sql |
Attachment Key, supports adding multiple attachments, you can call GetUserUploadFileJob The interface obtains the parameter. Note Only. xml files of the iBatis framework or MyBatis framework and SQL files in the.
txt format are supported.
|
| Tid | Long | No | 1 |
The tenant ID. You can call GetUserActiveTenant or ListUserTenants The interface obtains the parameter. |
| RegionId | String | No | cn-hangzhou |
Select the service region of DMS. Used to call the interface. For the value, see RegionID parameter description . Note Set this parameter to the ID of the region that is close to your services.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931 |
The ID of the request. |
| Success | Boolean | true |
Indicates whether the request is successful. |
| ErrorMessage | String | UnknownError |
The error message that is returned. |
| ErrorCode | String | 200 |
The error code that is returned. |
| CreateOrderResult | Array of Long | 1423532 |
The ID of the ticket. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateSQLReviewOrder &Comment=test &RelatedUserList=[123443] &Param={"ProjectName":"xxx business SQL audit","DbId":123321,"AttachmentKeyList":["upload_xxxx.sql"]} &Tid=1&public request parameters
Sample success responses
XML format
HTTP/1.1 200 OK Content-Type:application/xml <CreateSQLReviewOrderResponse> <RequestId>0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931</RequestId> <Success>true</Success> <ErrorMessage>UnknownError</ErrorMessage> <ErrorCode>UnknownError</ErrorCode> <CreateOrderResult>1423532</CreateOrderResult> </CreateSQLReviewOrderResponse>
JSON format
HTTP/1.1 200 OK Content-Type:application/json { "RequestId" : "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931", "Success" : true, "ErrorMessage" : "UnknownError", "ErrorCode" : "UnknownError", "CreateOrderResult" : [ 1423532 ] }
Error code
Go to the Error Center View more error codes.