Creates a sync node.


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 CreateDISyncTask

The operation that you want to perform.

ProjectId Long Yes 10000

The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the workspace ID.

RegionId String Yes cn-zhangjiakou

The ID of the region in which you want to create the sync node. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation.

TaskContent String Yes null

The configuration of the sync node to be created. This operation is equivalent to node creation by using the code editor in the DataWorks console. For more information, see Create a sync node by using the code editor.

You can call the CreateDISyncTask operation to create only batch sync nodes.

TaskName String Yes new_di_task

The name of the sync node.

TaskParam String Yes {"FileFolderPath":"Workflow/XXX/Data Integration","ResourceGroup":"S_res_group_XXX_XXXX"}

The settings that specify the storage path of the sync node and the resource group used by the node. The following fields are supported:

  • FileFolderPath: the storage path of the node.
  • ResourceGroup: the identifier of the resource group for Data Integration that is used by the node. To query the identifier of the resource group, call the ListResourceGroup operation.
TaskType String Yes DI_OFFLINE

The type of the sync node.

You can call the CreateDISyncTask operation to create only batch sync nodes. The value must be DI_OFFLINE.

ClientToken String No 0000-ABCD-EFG****

The client token that is used to ensure the idempotence of the request. This parameter can be left empty.

Response parameters

Parameter Type Example Description
Data Struct

The information that indicates whether the sync node was created.

FileId Long 1000001

The ID of the created sync node.

Message String Invalid path: Workflow/xxxx/Data Integration

The reason why the sync node failed to be created.

Status String success

Indicates whether the sync node was created. Valid values:

  • success: The sync node was created.
  • fail: The sync node failed to be created.
RequestId String 0bc1411515937635973****

The ID of the request. You can locate logs and troubleshoot issues based on the ID.

Success Boolean true

Indicates whether the request is successful.


Sample requests

&TaskParam={"FileFolderPath":"Workflow/XXX/Data Integration","ResourceGroup":"S_res_group_XXX_XXXX"}
&<Common request parameters>

Sample success responses

XML format

    <Message>Invalid path: Workflow/xxxx/Data Integration</Message>

JSON format

    "RequestId": "0bc1411515937635973****",
    "Data": {
        "Status": "success",
        "Message": "Invalid path: Workflow/xxxx/Data Integration",
        "FileId": 1000001
    "Success": true

Error codes

HTTP status code Error code Error message Description
403 Forbidden.DI.NoPrivilege No access. The error message returned because you do not have the required permissions.
500 InternalError.DI.Parameter A DI internal error occurred. The error message returned because an internal error in Data Integration occurred.
400 Invalid.DI.Parameter The parameter is invalid. The error code returned because one or more parameters are invalid.
400 Invalid.DI.Parameter.File.Existed The file name already exists. The error message returned because the specified file name already exists.

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