Creates a ticket for changing data.
For more information about the Normal Data Modify feature, see Change common data.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Comment | String | Yes | test |
The purpose or objective of the data change. This reduces unnecessary communication. |
RelatedUserList | Array of Long | No | 123443 |
The stakeholders of this operation. All stakeholders can view the ticket details and assist in the approval process. Irrelevant users other than Data Management (DMS) administrators and database administrators (DBAs) are not allowed to view the ticket details. |
Param | Object | Yes |
The parameters of the ticket. |
|
Classify | String | No | test |
The reason for the data change. |
EstimateAffectRows | Long | Yes | 1 |
The estimated number of data rows to be affected by this data change. To obtain the actual number of affected rows, you can use the COUNT function in SQL statements on the SQLConsole tab. |
ExecSQL | String | No | update base_user set id = 1 where id = 1; |
The SQL statements that you want to execute to change data. Note If the SqlType parameter is set to TEXT, this parameter is required.
|
SqlType | String | Yes | TEXT |
The format of the SQL statements for the data change. Valid values:
|
AttachmentName | String | No | test.sql |
The key of the attachment that contains the SQL statements for the data change. You can call the GetUserUploadFileJob operation to obtain the attachment key from the value of the AttachmentKey parameter. Note If the SqlType parameter is set to ATTACHMENT, this parameter is required.
|
RollbackSQL | String | No | update base_user set id = 1 where id = 1; |
The SQL statements for rolling back the data change. Note If the RollbackSqlType parameter is set to TEXT, this parameter is required.
|
RollbackAttachmentName | String | No | test_rollback.sql |
The key of the attachment that contains the SQL statements for rolling back the data change. You can call the GetUserUploadFileJob operation to obtain the attachment key from the value of the AttachmentKey parameter. Note If the RollbackSqlType parameter is set to ATTACHMENT, this parameter is required.
|
RollbackSqlType | String | No | TEXT |
The format of the SQL statements for rolling back the data change. Valid values:
|
DbItemList | Array | Yes |
The databases that you want to change data. |
|
DbId | Long | Yes | 124353 |
The ID of the database. You can call the SearchDatabases operation to query the ID of the database. |
Logic | Boolean | Yes | false |
Specifies whether the database is a logical database. Valid values:
|
AttachmentKey | String | No | order_attachment.txt |
The key of the attachment for the ticket. The attachment provides more instructions for this operation. You can call the GetUserUploadFileJob operation to query the key of the attachment. |
Tid | Long | No | 1 |
The ID of the tenant. Note The ID of the tenant is displayed when you move the pointer over the profile picture
in the upper-right corner of the DMS console. For more information, see Tenant information.
|
RegionId | String | No | cn-hangzhou |
The ID of the region where the DMS service resides. For more information about the valid values of this parameter, see RegionID parameter. 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 call was successful. |
ErrorMessage | String | UnknownError |
The error message that is returned. |
ErrorCode | String | UnknownError |
The error code that is returned. |
CreateOrderResult | Array of Long | 1423532 |
The ID of the ticket for the data change. |
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Comment=test
&RelatedUserList=[123443]
&Param={"Classify":"test","EstimateAffectRows":1,"ExecSQL":"update base_user set id = 1 where id = 1;","SqlType":"TEXT","AttachmentName":"test.sql","RollbackSQL":"update base_user set id = 1 where id = 1;","RollbackAttachmentName":"test_rollback.sql","RollbackSqlType":"TEXT","DbItemList":[{"DbId":124353,"Logic":false}]}
&AttachmentKey=order_attachment.txt
&Tid=1
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateDataCorrectOrderResponse>
<CreateOrderResult>22600000</CreateOrderResult>
<RequestId>99CC9FC3-3E00-4AAA-A0FD-78973A44D941</RequestId>
<Success>true</Success>
</CreateDataCorrectOrderResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"CreateOrderResult" : [ 22600000 ],
"RequestId" : "99CC9FC3-3E00-4AAA-A0FD-78973A44D941",
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.