All Products
Search
Document Center

:SubmitFile

最終更新日:May 13, 2024

Commits a file to the development environment of the scheduling system to generate a task. This API operation processes your request in asynchronous mode. You can call the GetDeployment operation to check whether the file is committed.

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

SubmitFile

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

ProjectId

Long

No

10000

The DataWorks workspace ID. You can log on to the DataWorks console and go to the Work space page to obtain the workspace ID. You must configure either this parameter or the ProjectIdentifier parameter to determine the DataWorks workspace to which the operation is applied.

ProjectIdentifier

String

No

dw_project

The name of the DataWorks workspace. You can log on to the DataWorks console and go to the Work space page to obtain the workspace name. You must configure either this parameter or the ProjectId parameter to determine the DataWorks workspace to which the operation is applied.

FileId

Long

Yes

1000000

The file ID. You can call the ListFiles operation to query the ID.

Comment

String

No

Commit for the first time

The description of the commit operation.

SkipAllDeployFileExtensions

Boolean

No

false

Specifies whether to skip the pre-publish check after the file is committed. Valid values:

  • false: indicates that the pre-publish check is not skipped. After the file is committed, the pre-publish check is automatically triggered. The file can be deployed only after the file passes the check.

  • true: indicates that the pre-publish check is skipped. After the file is submitted, the pre-publish check process is not triggered. You can directly deploy the file.

Response parameters

Parameter

Type

Example

Description

HttpStatusCode

Integer

200

The HTTP status code.

Data

Long

3000001

The ID of the deployment package. The ID is used as the value of a specific request parameter when you call the GetDeployment operation to query the details of the deployment package.

RequestId

String

0000-ABCD-EFG****

The request ID.

ErrorMessage

String

The connection does not exist.

The error message.

Success

Boolean

true

Indicates whether the request was successful.

ErrorCode

String

Invalid.Tenant.ConnectionNotExists

The error code.

Examples

Sample requests

http(s)://[Endpoint]/?Action=SubmitFile
&ProjectId=10000
&ProjectIdentifier=dw_project
&FileId=1000000
&Comment=Commit for the first time
&SkipAllDeployFileExtensions=false
&<Common request parameters>

Sample success responses

XML format

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

<SubmitFileResponse>
    <HttpStatusCode>200</HttpStatusCode>
    <Data>3000001</Data>
    <RequestId>0000-ABCD-EFG****</RequestId>
    <ErrorMessage>The connection does not exist.</ErrorMessage>
    <Success>true</Success>
    <ErrorCode>Invalid.Tenant.ConnectionNotExists</ErrorCode>
</SubmitFileResponse>

JSON format

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

{
  "HttpStatusCode" : 200,
  "Data" : 3000001,
  "RequestId" : "0000-ABCD-EFG****",
  "ErrorMessage" : "The connection does not exist.",
  "Success" : true,
  "ErrorCode" : "Invalid.Tenant.ConnectionNotExists"
}

Error codes

HTTP status code

Error code

Error message

Description

403

Forbidden.Access

Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition.

No permissions.

429

Throttling.Api

The request for this resource has exceeded your available limit.

The number of requests for the resource has exceeded the upper limit.

429

Throttling.System

The DataWorks system is busy. Try again later.

The DataWorks system is busy. Try again later.

429

Throttling.User

Your request is too frequent. Try again later.

Excessive requests have been submitted within a short period of time. Try again later.

500

InternalError.System

An internal system error occurred. Try again later.

An internal error occurred. Try again later.

500

InternalError.UserId.Missing

An internal system error occurred. Try again later.

An internal error occurred. Try again later.

For a list of error codes, see Service error codes.