Creates a ticket for changing data in Data Management (DMS).

For more information about the Normal Data Modify feature, see Change regular data.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateDataCorrectOrder

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

Comment String Yes test

The purpose or objective of the data change. This parameter is used to help reduce unnecessary communication.

RelatedUserList Array of Long No 51****

The stakeholders of the data change. All stakeholders can view the ticket details and assist in the approval process. Irrelevant users other than 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 the data change.

ExecSQL String No update base_user set id = 1 where id = 1;

The SQL statements that you want to execute to change data.

Note This parameter is required if you set the SqlType parameter to TEXT.
SqlType String Yes TEXT

The format of the SQL statements used to change data. Valid values:

  • TEXT: text
  • ATTACHMENT: attachment
AttachmentName String No test.sql

The key of the attachment that contains the SQL statements used to change data. You can call the GetUserUploadFileJob operation to obtain the attachment key from the value of the AttachmentKey parameter.

Note This parameter is required if you set the SqlType parameter to ATTACHMENT.
RollbackSQL String No update base_user set id = 1 where id = 1;

The SQL statements used to roll back the data change.

Note
  • This parameter is required if you set the RollbackSqlType parameter to TEXT.
RollbackAttachmentName String No test_rollback.sql

The key of the attachment that contains the SQL statements used to roll back the data change. You can call the GetUserUploadFileJob operation to the attachment key from the value of the AttachmentKey parameter.

Note This parameter is required if you set the RollbackSqlType parameter to ATTACHMENT.
RollbackSqlType String No TEXT

The format of the SQL statements used to roll back the data change. Valid values:

  • TEXT: text
  • ATTACHMENT: attachment
DbItemList Array Yes

The databases in which you want to change data.

DbId Long Yes 1860****

The ID of the database. The database can be a physical database or a logical database.

Logic Boolean Yes false

Specifies whether the database is a logical database. Valid values:

  • true: The database is a logical database.
  • false: The database is a physical database.
ExecMode String No COMMITOR

The execution mode of the ticket after the ticket is approved. Valid values:

  • COMMITOR: The data change is performed by the user who submits the ticket.
  • AUTO: The data change is automatically performed after the ticket is approved.
  • LAST_AUDITOR: The data change is performed by the last approver of the ticket.
AttachmentKey String No order_attachment.txt

The key of the attachment that provides more instructions for the ticket. You can call the GetUserUploadFileJob operation to obtain the attachment key from the value of the AttachmentKey parameter.

Tid Long No 3***

The ID of the tenant. You can call the GetUserActiveTenant or ListUserTenants operation to obtain the tenant ID.

RegionId String No cn-hangzhou

The ID of the region in which DMS is activated. For more information, see RegionID parameter.

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. Valid values:

  • true: The request is successful.
  • false: The request fails.
ErrorMessage String UnknownError

The error message returned if the request fails.

ErrorCode String UnknownError

The error code returned if the request fails.

CreateOrderResult Array of Long 142****

The ID of the ticket.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?Action=CreateDataCorrectOrder
&Comment=test
&Param={"Classify":"test","EstimateAffectRows":1,"ExecSQL":"update base_user set id = 1 where id  = 1;","SqlType":"TEXT","DbItemList":[{"DbId":1860****,"Logic":false}],"ExecMode":"COMMITOR"}
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateDataCorrectOrderResponse>
    <RequestId>0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931</RequestId>
    <Success>true</Success>
    <CreateOrderResult>142****</CreateOrderResult>
</CreateDataCorrectOrderResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
  "Success" : true,
  "CreateOrderResult" : [ "142****" ]
}

Error codes

For a list of error codes, visit the API Error Center.