BladePipe 1.7.0: Stronger alerts, Broader DB support, Faster KingbaseES scanning.
跳到主要内容

Export DataJob Tune Insight

Interface Overview

Export tune insight data by DataJob ID and DataTask ID. The exported JSON contains basic task information, key task configurations, monitoring metrics, and task logs within the specified time window. It can be used to troubleshoot task delay, resource usage issues, and source or target performance problems.

This interface returns a JSON file attachment. It does not use the common OpenAPI response wrapper with code, data, msg, and requestId.

Interface Address

/cloudcanal/console/api/v1/openapi/datajob/queryjobtuneinsight

Request Manner

POST

Request Parameters

ParameterNameParameter DescriptionRequestTypeWhether RequiredDataType
dataJobIdDataJob IDbodyTruelong
dataTaskIdDataTask IDbodyTruelong
startTimeMsStart time of the diagnostic window, Unix timestamp in millisecondsbodyFalselong
endTimeMsEnd time of the diagnostic window, Unix timestamp in millisecondsbodyFalselong

Time Window

  • startTimeMs and endTimeMs must be both empty or both provided.
  • If both parameters are empty, the latest 5 minutes are exported by default.
  • If both parameters are provided, startTimeMs must be less than endTimeMs.
  • The time window cannot exceed 1 hour.

Response Result

When the request succeeds, the interface returns a JSON file attachment. Response header example:

Content-Disposition: attachment;filename=canalxxxx_INCREMENT_20260601164144.json
Content-Type: application/json;charset=UTF-8

JSON File Parameters

ParameterNameParameter DescriptionNotNullDataType
dataJobIdDataJob IDTruelong
dataTaskIdDataTask IDTruelong
taskNameDataTask nameTruestring
sourceDataSourceTypeSource DataSource typeFalsestring
targetDataSourceTypeTarget DataSource typeFalsestring
consoleVersionConsole versionFalsestring
authCodeTypeLicense version typeFalsestring
taskTypeDataTask type. Options: FULL, INCREMENT, CHECK, REVISE, BUILD_STRUCT, etc.Truestring
windowStartStart time of the diagnostic windowTruestring
windowEndEnd time of the diagnostic windowTruestring
configsKey task configurationsFalsearray
monitorSectionsMonitoring metric sectionsFalsearray
taskLogsTask logsFalseobject

configs

ParameterNameParameter DescriptionNotNullDataType
configNameConfiguration nameTruestring
configTypeConfiguration entity type. Options: BUSINESS, SERVER_CORE, DATASOURCE, MAPPINGFalsestring
configValueConfiguration valueFalsestring
descriptionConfiguration descriptionFalsestring
endPointTypeEndpoint type. Options: SOURCE, TARGET, INDEPENDENTFalsestring

monitorSections

ParameterNameParameter DescriptionNotNullDataType
sectionTypeMetric section type. Options: resource, source, targetTruestring
monitorTypeMonitor type. Options: mac, task_resource, task_performanceFalsestring
titleSection titleFalsestring
metricsMetric listFalsearray

metrics

ParameterNameParameter DescriptionNotNullDataType
titleMetric titleFalsestring
statusMetric query status. Options: success, no_data, errorTruestring
maxValueMaximum metric valueFalsedecimal
miniValueMinimum metric valueFalsedecimal
pointsMetric time series pointsFalsearray

points

ParameterNameParameter DescriptionNotNullDataType
timeMetric timeTruestring
valueMetric valueTruedecimal

taskLogs

ParameterNameParameter DescriptionNotNullDataType
taskMainLogMain task logFalseobject
applyCommitLogApply commit logFalseobject

Task log object parameters:

ParameterNameParameter DescriptionNotNullDataType
fileNameLog file nameFalsestring
descriptionLog descriptionFalsestring
lineCountNumber of log linesTrueint
linesLog content split by lineTruearray

Logs returned for different DataTask types:

  • BUILD_STRUCT: No task logs are returned.
  • CHECK and REVISE: taskMainLog is returned.
  • Other DataTask types: taskMainLog and applyCommitLog are returned.

Request Example

{
"dataJobId": 2222,
"dataTaskId": 4507,
"startTimeMs": 1780299703372,
"endTimeMs": 1780303303343
}

Response Example

{
"dataJobId": 2222,
"dataTaskId": 4507,
"taskName": "canalf7ica030db6_INCREMENT",
"sourceDataSourceType": "MySQL",
"targetDataSourceType": "MySQL",
"consoleVersion": "6.1.0",
"authCodeType": "V6",
"taskType": "INCREMENT",
"windowStart": "2026-06-01 15:41:43.372",
"windowEnd": "2026-06-01 16:41:43.343",
"configs": [
{
"configName": "increBatchSize",
"configType": "SERVER_CORE",
"configValue": "64",
"description": "Incremental batch size",
"endPointType": "INDEPENDENT"
}
],
"monitorSections": [
{
"sectionType": "resource",
"monitorType": "task_resource",
"title": "Resource",
"metrics": [
{
"title": "CPU",
"status": "success",
"maxValue": 0.42,
"miniValue": 0.12,
"points": [
{
"time": "2026-06-01 15:41:40.000",
"value": 0.12
}
]
}
]
}
],
"taskLogs": {
"taskMainLog": {
"fileName": "canalf7ica030db6_INCREMENT.log",
"description": "The main log content when DataTask running.",
"lineCount": 1,
"lines": [
"2026-06-01 15:41:43.372 INFO task started"
]
},
"applyCommitLog": {
"fileName": "apply_commit.log",
"description": "The commit log with primary key, elapse, action and other information.",
"lineCount": 0,
"lines": []
}
}
}