ListRefDISyncTasks

Updated at:

Queries synchronization tasks in Data Integration that use a specific data source.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

integer

Yes

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

10000

DatasourceName

string

Yes

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

mysql_datasource

TaskType

string

Yes

The type of the synchronization task that you want to query. Valid values:

  • DI_OFFLINE: batch synchronization task

  • DI_REALTIME: real-time synchronization task

DI_OFFLINE

RefType

string

Yes

The condition used to filter synchronization tasks. Valid values:

  • from: queries the synchronization tasks that use the data source as the source.

  • to: queries the synchronization tasks that use the data source as the destination.

from

PageNumber

integer

No

The page number. Valid values: 1 to 100.

11

PageSize

integer

No

The number of entries per page.

50

Response elements

Element

Type

Description

Example

object

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: successful

  • false: failed

true

RequestId

string

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

0bc1411515937635973****

Data

object

The returned result.

DISyncTasks

array<object>

The details of the synchronization tasks. In most cases, a data source is used by multiple synchronization tasks. 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 synchronization task.

object

The details of the synchronization tasks. In most cases, a data source is used by multiple synchronization tasks. 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 synchronization task.

DiSourceDatasource

string

The source of the synchronization task. If the synchronization task has multiple sources, the return value is a JSON array, such as ["odps_writer", "mysql"]. If the RefType parameter is set to from, the synchronization tasks that use the specified data source as the source are returned. In this case, the value of this parameter indicates the specified data source.

[\"odps_writer\"]

TaskType

string

The type of the synchronization task. Valid values:

  • DI_OFFLINE: batch synchronization task

  • DI_REALTIME: real-time synchronization task

DI_OFFLINE

DiDestinationDatasource

string

The destination of the synchronization task. If the synchronization task has multiple destinations, the return value is a JSON array, such as ["odps_writer", "mysql"]. If the RefType parameter is set to to, the synchronization tasks that use the specified data source as the destination are returned. In this case, the value of this parameter indicates the specified data source.

[\"qcc_polardb2\"]

NodeName

string

The name of the synchronization task.

abcd1234

NodeId

integer

The ID of the synchronization task.

100000

Examples

Success response

JSON format

{
  "Success": true,
  "RequestId": "0bc1411515937635973****",
  "Data": {
    "DISyncTasks": [
      {
        "DiSourceDatasource": "[\\\"odps_writer\\\"]",
        "TaskType": "DI_OFFLINE",
        "DiDestinationDatasource": "[\\\"qcc_polardb2\\\"]",
        "NodeName": "abcd1234",
        "NodeId": 100000
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 Invalid.DI.Parameter The parameter is invalid.
400 Invalid.DI.Parameter.File.Existed The file name already exists.
500 InternalError.DI.Parameter A DI internal error occurred.
403 Forbidden.DI.NoPrivilege No access.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.