Creates a task to upload an attachment file.

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 CreateUploadFileJob

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

FileSource String Yes datacorrect

The purpose of the attachment file. Valid values:

  • datacorrect: The file is uploaded to change data.
  • order_info_attachment: The file is uploaded as an attachment in a ticket.
  • big-file: The file is uploaded to import multiple data records at a time.
  • sqlreview: The file is uploaded for SQL review.
FileName String Yes test.txt

The name of the attachment file.

Note The file name must end with .txt or .sql. For example, the file name can be test.txt or test.sql.
UploadURL String Yes https://XXX.oss-cn-hangzhou.aliyuncs.com/test.txt

The URL of the attachment file. The URL must be an HTTP URL or an HTTPS URL.

Note You can upload the attachment file to an Object Storage Service (OSS) bucket and obtain the URL of the file in the OSS console. For more information, see Share objects.
Tid Long No 3***

The ID of the tenant.

Note You can call the GetUserActiveTenant operation to query the tenant ID.
RegionId String No cn-hangzhou

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

Note

Response parameters

Parameter Type Example Description
RequestId String E103C5F9-DE47-53F2-BF34-D71DF38F****

The ID of the request.

Success Boolean true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
ErrorMessage String Unsupported url scheme : null, scheme must be https or http

The error message returned.

ErrorCode String InvalidParameterValid

The error code returned.

JobKey String 761f18031635736380812****

The key of the task.

Note You can call the GetUserUploadFileJob operation to query the progress and details of the task.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?FileSource=datacorrect
&FileName=test.txt
&UploadType=URL
&UploadURL=https://XXX.oss-cn-hangzhou.aliyuncs.com/test.txt
&Tid=3***
&Common request parameters

Sample success responses

XML format

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

<CreateUploadFileJobResponse>
    <JobKey>761f18031635736380812****</JobKey>
    <RequestId>E103C5F9-DE47-53F2-BF34-D71DF38F****</RequestId>
    <Success>true</Success>
</CreateUploadFileJobResponse>

JSON format

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

{
  "JobKey" : "761f18031635736380812****",
  "RequestId" : "E103C5F9-DE47-53F2-BF34-D71DF38F****",
  "Success" : true
}

Error codes

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