Queries the details of a real-time synchronization node or a data synchronization solution.

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 GetDISyncTask

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

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 query the workspace ID.

This parameter specifies the DataWorks workspace to which the operation is applied.

TaskType String Yes DI_REALTIME

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

  • DI_REALTIME: real-time synchronization node
  • DI_SOLUTION: data synchronization solution
RegionId String Yes cn-zhangjiakou

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

FileId Long Yes 100
  • If you set the TaskType parameter to DI_REALTIME, set the FileId parameter to the ID of the real-time synchronization node that you want to query.
  • If you set the TaskType parameter to DI_SOLUTION, set the FileId parameter to the ID of the data synchronization solution that you want to query.

You can call the ListFiles operation to query the ID of the real-time synchronization node or data synchronization solution.

Response parameters

Parameter Type Example Description
Success Boolean true

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.
RequestId String 0bc1411515937635973****

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

Data Object

The details of the real-time synchronization node or data synchronization solution.

Code String null
  • If the TaskType parameter is set to DI_REALTIME, the details of the real-time synchronization node are returned.
  • If the TaskType parameter is set to DI_SOLUTION, the value null is returned.
Status String success

Indicates whether the details of the real-time synchronization node or data synchronization solution are obtained. Valid values:

success: The details are obtained.

fail: The details fail to be obtained.

Message String fileId:[100] is invalid.

The cause of the failure to obtain the details of the real-time synchronization node or data synchronization solution.

If the details of the real-time synchronization node or data synchronization solution are obtained, the value null is returned.

SolutionDetail Object
  • If the TaskType parameter is set to DI_REALTIME, the value null is returned.
  • If the TaskType parameter is set to DI_SOLUTION, the details of the data synchronization solution task are returned.
Status String 0

The status of the data synchronization solution. Valid values:

  • 0: successful
  • 1: not running
  • 2: running
  • 3: failed
  • 4: committed
  • 5: pending manual confirmation
  • 6: manually confirmed
  • 7: others
  • 8: waiting
  • 9: deleted
Type String holo

The type of the data synchronization solution.

StartTime String 2021-12-07 14:40:51

The start time of the data synchronization solution.

CreatorName String dataworks_di

The creator of the data synchronization solution.

ProjectId Long 10000

The ID of the project to which the data synchronization solution belongs.

SourceType String mysql

The type of the source of the data synchronization solution.

ProcessContent String null

The configuration details of the data synchronization solution.

Name String holo_20211206161025

The name of the data synchronization solution.

ProcessExtra String null

The additional parameters of the data synchronization solution.

SubmitTime String 2021-12-07 14:40:51

The time when the data synchronization solution was committed.

Id Long 100

The ID of the data synchronization solution.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetDISyncTask
&ProjectId=10000
&TaskType=DI_REALTIME
&FileId=100
&<Common request parameters>

Sample success responses

XML format

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

<GetDISyncTaskResponse>
    <Success>true</Success>
    <RequestId>0bc1411515937635973****    </RequestId>
    <Data>
        <Code>{"extend":{"mode":"wizard","resourceGroup":"S_res_group_287114642182658_1560324290517"},"nodeDef":{},"order":{"hops":[{"from":"datahub_8htXSsfiS2vtZCVG","to":"datahub_CRHBAyGfhSaLmv2f"}]},"setting":{"errorLimit":{},"jvmOption":""},"steps":[{"stepType":"datahub","category":"writer","displayName":"DataHub1","parameter":{"batchSize":1000,"datasource":"datahub_cloud_dev_test","topic":"dwd_tfc_opt_speed_rid_amap_rt"},"name":"datahub_CRHBAyGfhSaLmv2f","gui":{"x":262,"y":325}},{"stepType":"datahub","displayName":"DataHub2","parameter":{"datasource":"datahub_uric_test","topic":"dwd_tfc_opt_speed_rid_amap_rt_330000","batchSize":1000},"name":"datahub_8htXSsfiS2vtZCVG","gui":{"x":268,"y":160.5},"category":"writer"}]}</Code>
        <Status>success</Status>
        <Message>fileId:[100] is invalid.</Message>
        <SolutionDetail>
            <Status>0</Status>
            <Type>holo</Type>
            <StartTime>2021-12-07 14:40:51</StartTime>
            <CreatorName>dataworks_di</CreatorName>
            <ProjectId>10000</ProjectId>
            <SourceType>mysql</SourceType>
            <ProcessContent>{"holoDatasource":"holo","offlineSyncConfig":{"nodeNameRule":"oneclick_holo_di_${db_table_name_src}_to_${db_table_name_dest}","resourceGroup":"group_219193793999490"},"processRuleId":1007,"readerConcurrent":10,"realtimeSyncConfig":{"content":{"order":{"hops":[{"from":"reader","to":"writer"}]},"setting":{"speed":{"readerConcurrent":10}},"steps":[{"stepType":"mysql","name":"reader","category":"reader","parameter":{"connection":[{"datasource":"mm","datasourceType":"mysql","table":[]}]}},{"stepType":"holo","name":"writer","category":"writer","parameter":{"datasource":"holo","writeMode":"replay","datasourceSchema":"public","tableMappingRule":{"datasource":[{"tableRule":[],"srcDatasourceName":"mm"}]}}}]},"extend":{"mode":"migration_holo","resourceGroup":"group_219193793999490"}},"setting":{"autoCreateWorkflow":true,"userDefinedFileNameExpression":"oneclick"},"srcType":"mysql","tableMappingRuleFromRealtimeSyncConfig":{"datasource":[{"srcDatasourceName":"mm","tableRule":[]}]}}</ProcessContent>
            <Name>holo_20211206161025</Name>
            <ProcessExtra>{"processType":"new","tableNum":300}</ProcessExtra>
            <SubmitTime>2021-12-07 14:40:51</SubmitTime>
            <Id>100</Id>
        </SolutionDetail>
    </Data>
</GetDISyncTaskResponse>

JSON format

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

{
  "Success" : true,
  "RequestId" : "0bc1411515937635973****",
  "Data" : {
    "Code" : "{\"extend\":{\"mode\":\"wizard\",\"resourceGroup\":\"S_res_group_287114642182658_1560324290517\"},\"nodeDef\":{},\"order\":{\"hops\":[{\"from\":\"datahub_8htXSsfiS2vtZCVG\",\"to\":\"datahub_CRHBAyGfhSaLmv2f\"}]},\"setting\":{\"errorLimit\":{},\"jvmOption\":\"\"},\"steps\":[{\"stepType\":\"datahub\",\"category\":\"writer\",\"displayName\":\"DataHub1\",\"parameter\":{\"batchSize\":1000,\"datasource\":\"datahub_cloud_dev_test\",\"topic\":\"dwd_tfc_opt_speed_rid_amap_rt\"},\"name\":\"datahub_CRHBAyGfhSaLmv2f\",\"gui\":{\"x\":262,\"y\":325}},{\"stepType\":\"datahub\",\"displayName\":\"DataHub2\",\"parameter\":{\"datasource\":\"datahub_uric_test\",\"topic\":\"dwd_tfc_opt_speed_rid_amap_rt_330000\",\"batchSize\":1000},\"name\":\"datahub_8htXSsfiS2vtZCVG\",\"gui\":{\"x\":268,\"y\":160.5},\"category\":\"writer\"}]}",
    "Status" : "success",
    "Message" : "fileId:[100] is invalid.",
    "SolutionDetail" : {
      "Status" : 0,
      "Type" : "holo",
      "StartTime" : "2021-12-07 14:40:51",
      "CreatorName" : "dataworks_di",
      "ProjectId" : 10000,
      "SourceType" : "mysql",
      "ProcessContent" : "{\"holoDatasource\":\"holo\",\"offlineSyncConfig\":{\"nodeNameRule\":\"oneclick_holo_di_${db_table_name_src}_to_${db_table_name_dest}\",\"resourceGroup\":\"group_219193793999490\"},\"processRuleId\":1007,\"readerConcurrent\":10,\"realtimeSyncConfig\":{\"content\":{\"order\":{\"hops\":[{\"from\":\"reader\",\"to\":\"writer\"}]},\"setting\":{\"speed\":{\"readerConcurrent\":10}},\"steps\":[{\"stepType\":\"mysql\",\"name\":\"reader\",\"category\":\"reader\",\"parameter\":{\"connection\":[{\"datasource\":\"mm\",\"datasourceType\":\"mysql\",\"table\":[]}]}},{\"stepType\":\"holo\",\"name\":\"writer\",\"category\":\"writer\",\"parameter\":{\"datasource\":\"holo\",\"writeMode\":\"replay\",\"datasourceSchema\":\"public\",\"tableMappingRule\":{\"datasource\":[{\"tableRule\":[],\"srcDatasourceName\":\"mm\"}]}}}]},\"extend\":{\"mode\":\"migration_holo\",\"resourceGroup\":\"group_219193793999490\"}},\"setting\":{\"autoCreateWorkflow\":true,\"userDefinedFileNameExpression\":\"oneclick\"},\"srcType\":\"mysql\",\"tableMappingRuleFromRealtimeSyncConfig\":{\"datasource\":[{\"srcDatasourceName\":\"mm\",\"tableRule\":[]}]}}",
      "Name" : "holo_20211206161025",
      "ProcessExtra" : "{\"processType\":\"new\",\"tableNum\":300}",
      "SubmitTime" : "2021-12-07 14:40:51",
      "Id" : 100
    }
  }
}

Error codes

HTTP status code Error code Error message Description
400 Param.Invalid The parameter is invalid. The error message returned because one or more parameters are invalid.
500 InternalError.System An internal error occurred. The error message returned because an internal error has occurred.
403 Forbidden.Access Access is forbidden. The error message returned because you are not authorized to perform this operation.

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