All Products
Search
Document Center

DataWorks:GetDISyncTask

Last Updated:Feb 05, 2025

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

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:*get
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectIdlongYes

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

You must configure this parameter to specify the DataWorks workspace to which the API operation is applied.

10000
TaskTypestringYes

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

  • DI_REALTIME: real-time synchronization task
  • DI_SOLUTION: data synchronization solution
DI_REALTIME
FileIdlongYes
  • If you set TaskType to DI_REALTIME, set this parameter to the ID of the real-time synchronization task that you want to deploy.
  • If you set TaskType to DI_SOLUTION, set this parameter to the ID of the data synchronization solution that you want to deploy.

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

100

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Successboolean

Indicates whether the request was successful. Valid values:

  • True
  • False
true
RequestIdstring

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

0bc1411515937635973****
Dataobject

The returned results.

Codestring
  • If the TaskType parameter is set to DI_REALTIME, the details of the real-time synchronization task are returned.
  • If the TaskType parameter is set to DI_SOLUTION, the value null is returned.
{"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"}]}
Statusstring

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

success: The details are obtained. fail: The details fail to be obtained.

success
Messagestring

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

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

fileId:[100] is invalid.
AlarmListarray<object>

Array of alarm rules associated with real-time tasks.

alarmListobject

Alarm rules associated with a single real-time task.

Idlong

Alarm rule id.

45242
Enabledboolean

Whether alarm rules are enabled.

true
RuleNamestring

Alarm rule name.

Delay alert rule name 1
Metricstring

Alarm Type:

  • taskStatus: task status
  • bizDelay: business latency
  • taskFailoverCount: monitoring Failover
  • ddlUnsupport: DDL is not supported
  • ddlReport: DDL notifications
  • totalDirtyRecordWriteInLines: dirty data
taskStatus
Descriptionstring

Alarm rule description.

Description
AlarmRuleListarray<object>

Alarm Notification configuration array.

alarmRuleListobject

Alarm Notification configuration.

Levelstring
  • WARNING WARNING: alert
  • CRITICAL CRITICAL: alarm
WARNING
Comparatorstring

Comparison method of comparison symbols, indicators and alarm rules

  • '='
  • '<'
  • '>'
=
Thresholdlong

Comparison threshold between metrics and alarm rules.

1
Durationlong

Duration: How long does this condition last before an alarm is triggered, in minutes.

3
Aggregatorstring

The calculation method of indicators,

  • avg interval average
  • max interval takes the maximum value
avg
NotifyRuleobject

Alert notification rule array.

Intervallong

Alarm interval, in minutes.

5
Warningarray

Warning-level alert notification list.

warningstring

Channel, optional enumeration value:

  • Mail
  • Phone
  • Sms (Sms)
  • Ding (DingTalk)
Ding
Criticalarray

Critical-level alert notification list.

criticalstring

Channel, optional enumeration value:

  • Mail
  • Phone
  • Sms (Sms)
  • Ding (DingTalk)
Ding
SolutionDetailobject
  • 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 are returned.
Statusstring

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
0
Typestring

The type of the data synchronization solution.

holo
StartTimestring

The start time of the data synchronization solution.

2021-12-07 14:40:51
CreatorNamestring

The creator of the data synchronization solution.

dataworks_di
ProjectIdlong

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

10000
SourceTypestring

The type of the source of the data synchronization solution.

mysql
ProcessContentstring

The configuration details of the data synchronization solution.

{"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":[]}]}}
Namestring

The name of the data synchronization solution.

holo_20211206161025
ProcessExtrastring

The additional parameters of the data synchronization solution.

{"processType":"new","tableNum":300}
SubmitTimestring

The time when the data synchronization solution was committed.

2021-12-07 14:40:51
Idlong

The ID of the data synchronization solution.

100

Examples

Sample success responses

JSONformat

{
  "Success": true,
  "RequestId": "0bc1411515937635973****\t",
  "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.",
    "AlarmList": [
      {
        "Id": 45242,
        "Enabled": true,
        "RuleName": "Delay alert rule name 1",
        "Metric": "taskStatus",
        "Description": "Description",
        "AlarmRuleList": [
          {
            "Level": "WARNING",
            "Comparator": "=",
            "Threshold": 1,
            "Duration": 3,
            "Aggregator": "avg"
          }
        ],
        "NotifyRule": {
          "Interval": 5,
          "Warning": [
            "Ding"
          ],
          "Critical": [
            "Ding"
          ]
        }
      }
    ],
    "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 codeError codeError messageDescription
400Param.InvalidThe parameter is invalid.Param invalid
403Forbidden.AccessAccess is forbidden.-
500InternalError.SystemAn internal error occurred.InternalError

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-01-13The Error code has changed. The response structure of the API has changedView Change Details