Queries the sync nodes that are associated with a specified data source.

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 ListRefDISyncTasks

The operation that you want to perform.

DatasourceName String Yes mysql_datasource

The name of the data source. You can call the ListDataSources operation to query the name of the data source.

TaskType String Yes DI_OFFLINE

The type of the sync node that you want to query. Valid values:

  • DI_OFFLINE: batch sync node
  • DI_REALTIME: real-time sync node

You can specify only one type. The sync solution type is not supported.

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.

RefType String Yes from

The condition used to filter sync nodes. Valid values:

  • from: queries the sync nodes that use the data source as the source data source.
  • to: queries the sync nodes that use the data source as the destination data source.
RegionId String Yes cn-shanghai

The ID of the region in which the DataWorks workspace resides. 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.

PageNumber Long Yes 1

The number of the page to return.

PageSize Long No 100

The number of entries to return on each page.

Response parameters

Parameter Type Example Description
Data Struct

The data returned for the query.

DISyncTasks Array of DISyncTasks

The details of the sync nodes.

A data source is usually associated with multiple sync nodes. Therefore, the value of this parameter is an array. The following parameters are the elements in the array. The sample values of these parameters show the details of a sync node.

DiDestinationDatasource String [\"qcc_polardb2\"]

The destination data source of the sync node.

If the sync node has multiple destination data sources, the return value is a JSON array, such as \"odps_writer\", \"mysql\".

If the RefType parameter is set to to, the sync nodes that use the specified data source as the destination data source are returned. In this case, the value of this parameter indicates the specified data source.

DiSourceDatasource String [\"odps_writer\"]

The source data source of the sync node.

If the sync node has multiple source data sources, the return value is a JSON array, such as \"odps_writer\", \"mysql\".

If the RefType parameter is set to from, the sync nodes that use the specified data source as the source data source are returned. In this case, the value of this parameter indicates the specified data source.

NodeId Long 100000

The ID of the sync node.

NodeName String abcd1234

The name of the sync node.

TaskType String DI_OFFLINE

The type of the sync node. Valid values:

  • DI_OFFLINE: batch sync node
  • DI_REALTIME: real-time sync node
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 was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListRefDISyncTasks
&DatasourceName=mysql_datasource
&TaskType=DI_OFFLINE
&ProjectId=10000
&RefType=from
&RegionId=cn-shanghai
&PageNumber=1
&<Common request parameters>

Sample success responses

XML format

<RequestId>0bc1411515937635973****</RequestId>
<Data>
    <DISyncTasks>
        <DiDestinationDatasource>[\"qcc_polardb2\"]</DiDestinationDatasource>
        <NodeName>abcd1234</NodeName>
        <DiSourceDatasource>[\"odps_writer\"]</DiSourceDatasource>
        <TaskType>DI_OFFLINE</TaskType>
        <NodeId>100000</NodeId>
    </DISyncTasks>
</Data>
<Success>true</Success>

JSON format

{
    "RequestId": "0bc1411515937635973****",
    "Data": {
        "DISyncTasks": {
            "DiDestinationDatasource": "[\\\"qcc_polardb2\\\"]",
            "NodeName": "abcd1234",
            "DiSourceDatasource": "[\\\"odps_writer\\\"]",
            "TaskType": "DI_OFFLINE",
            "NodeId": 100000
        }
    },
    "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.