Creates a ticket for importing data to Data Management (DMS).
For more instructions on this feature, see Data import .
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | test |
The purpose or objective of the data change. This reduces unnecessary communication. |
Comment | String | Yes | test |
The purpose or objective of the data change. This reduces unnecessary communication. |
RelatedUserList | Array of Long | No | 24325 |
The stakeholders of this operation. 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 import. |
AttachmentName | String | Yes | test |
the attachment key of the imported data, you can call GetUserUploadFileJob The interface obtains this parameter (this parameter is the AttachmentKey parameter in the GetUserUploadFileJob interface). |
DbItemList | Array | Yes |
The database to which you want to import data. You can specify only one database. |
|
DbId | Long | Yes | 1342353 |
Database ID, callable SearchDatabases Interface acquisition. |
Logic | Boolean | Yes | false |
Specifies whether the database is a logical database. Valid values:
|
FileType | String | Yes | CSV |
The format of the file for the data import. Valid values:
|
FileEncoding | String | No | AUTO |
The encoding algorithm to be used by the destination database. Valid values:
|
TableName | String | No | t1 |
The destination table to which the data in the CSV format is imported. Note When FileType Parameters are CSV this parameter is required.
|
InsertType | String | No | INSERT |
The mode that is used to write the data in the CSV format to the destination table. Valid values:
Note When FileType Parameters are CSV this parameter is required.
|
CsvFirstRowIsColumnDef | Boolean | No | true |
The type of the CSV file. Valid values:
Note When FileType Parameters are CSV this parameter is required.
|
IgnoreError | Boolean | No | false |
Specifies whether to skip errors. Valid values:
|
ImportMode | String | No | FAST_MODE |
The import mode. Valid values:
|
RollbackSQL | String | No | empty |
The SQL statements for rolling back the data change. Note > When RollbackSqlType Parameters are TEXT this parameter is required.
|
RollbackAttachmentName | String | No | rollback.sql |
Roll back the SQL attachment key, you can call GetUserUploadFileJob The interface obtains this parameter (this parameter is the AttachmentKey parameter in the GetUserUploadFileJob interface). Note When RollbackSqlType Parameters are ATTACHMENT this parameter is required.
|
RollbackSqlType | String | No | TEXT |
The format of the SQL statements for rolling back the data change. 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 GetUserUploadFileJob The interface obtains the parameter. |
Tid | Long | No | 14325432 |
The ID of the tenant. Note Take the tenant ID information displayed in the upper right corner of the system.
For details, see View tenant information .
|
RegionId | String | No | cn-hangzhou |
Select the service region of DMS 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 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 | 13453 |
The ID of the ticket. |
Examples
Sample requests
http(s)://[Endpoint]/?Comment=test &RelatedUserList=[24325] &Param={"Classify":"test","AttachmentName":"test.csv","DbItemList":[{"DbId":1342353,"Logic":false}],"FileType":"CSV","FileEncoding":"AUTO","TableName":"t1","InsertType":"INSERT","CsvFirstRowIsColumnDef":true,"IgnoreError":false,"ImportMode":"FAST_MODE","RollbackSQL":"empty","RollbackAttachmentName":"rollback.sql","RollbackSqlType":"TEXT"} &AttachmentKey=order_attachment.txt &Tid=14325432&public request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK Content-Type:application/xml <CreateDataImportOrderResponse> <RequestId>0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931</RequestId> <Success>false</Success> <CreateOrderResult>13453</CreateOrderResult> </CreateDataImportOrderResponse>
JSON
format
HTTP/1.1 200 OK Content-Type:application/json { "RequestId" : "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931", "Success" : false, "CreateOrderResult" : [ 13453 ] }
Error codes
Visit the Error Center View more error codes.