Skip to main content

Query DataJob Detail

Interface Overview

Query task details based on the task id

Interface Address

/cloudcanal/console/api/v1/openapi/datajob/queryjob

Request Manner

POST

Request Parameters

ParameterNameParameter DescriptionRequestTypeWhether RequiredDataType
jobIdID of the taskBodyTrueLong

Public Response Results

ParameterNameParameter DescriptionNotNullType(Java)
code1: Success, 0: FailureTrueString
dataData returned (if any)FalseObject
msgError message (if any)FalseString
requestIdUnique identifier for the request and responseTrueString

Data Parameter Description

The result data contains basic DataJob information, the corresponding Task list, and basic data source information

ParameterNameParameter DescriptionNotNullType(Java)
dataJobIdID of the DataJobTrueLong
dataJobNameName of the DataJobTrueLong
dataJobDescDescription of the DataJobTrueString
gmtCreatedTime of creationTrueString
userNameOwner of the DataJobTrueString
dataJobTypeType of the DataJob. See Get Task Type List for more informationTrueLong
dataTaskStateCurrent phase of the DataJob. See DataJob Phase List for more informationTrueString
currTaskStatusThe status of current phase of the DataJob. DataTask Status List for more informationTrue | String
sourceDsVOInformation about the source data source. See Data Source Information for more informationTrueString
targetDsVOInformation about the target data source. See Data Source Information for more informationTrueString
dataTasksList of tasks. See dataTaskVO Parameter Description for more informationTrueString
sourceSchemaSchema information obtained by Querying Task Schema InformationFalseString
targetSchemaSchema information obtained by Querying Task Schema InformationFalseString
mappingConfigSchema information obtained by Querying Task Schema InformationFalseString
filterDDLWhether to filter DDL synchronization. True indicates filtering, and false indicates not filteringTrueBoolean
structMigrationWhether to perform structure migration.TrueBoolean
initialSyncWhether to initialize data (full migration) if it is a data synchronization task.FalseBoolean
shortTermNumNumber of days for short-term synchronization, if any.FalseInt
shortTermSyncWhether to perform short-term synchronization if it is a data migration task.FalseBoolean
fsmIdID of the state machine.TrueInt
fsmActiveWhether the state machine is active.FalseBoolean
consoleJobIdID of the asynchronous task that has been run or is currently running, and is the closest to the current time.FalseBoolean
consoleTaskStateState of the asynchronous task.FalseString
childJobsList of child tasks.FalseBoolean
lifeCycleStateLifecycle

CREATING
CREATED
DELETING
DELETED
LOCKED
FalseBoolean
srcSchemaLessFormatSchema type defined if the source is a message or cache.FalseBoolean
dstSchemaLessFormatSchema type defined if the target is a message or cache.FalseString
dstCaseSensitiveTypeCase-sensitive type of the target data source
UpperCase
LowerCase
Sensitive
NoSpecified
FalseBoolean
haveExceptionWhether an exception exists.FalseBoolean

DataTaskVO Parameter Description

ParameterNameParameter DescriptionNotNullType(Java)
dataTaskIdID of the data task.TrueLong
gmtCreateTime of creation.TrueString
gmtModifiedTime of the last modification.TrueString
dataTaskTypeType of the DataTask.
BUILD_STRUCT
FULL
INCREMENT
CHECK
REVISE
REVIEW
TrueString
dataTaskNameName of the data task.TrueString
dataTaskStatusCurrent status of the task. See Task Status List for more information.TrueString
dataJobIdID of the DataJob to which the task belongs.TrueLong
dataJobNameName of the DataJob to which the task belongs.FalseString
filterDdlWhether to filter DDL synchronization. True indicates filtering, and false indicates not filtering.TrueBoolean
checkOnceWhether to perform one-time verification.TrueBoolean
checkPeriodWhether to perform periodical verification.TrueBoolean
fullPeriodWhether to perform periodic migration.TrueBoolean
fullPeriodCronExprCronTab expression for periodic migration.FalseString
checkPeriodCronExprCronTab expression for periodical verification.FalseString
lastCheckTimeTime of the last verification.FalseString
fullJvmHeapMbHeap memory (in MB) for the Java process launched during full migration.FalseInt
incrementJvmHeapMbHeap memory (in MB) for the Java process launched during incremental synchronization.FalseInt
checkJvmHeapMbHeap memory (in MB) for the Java process launched during verification.FalseInt
taskPositionPosition of the task.FalseString
healthLevelHealth status of the task. Possible values are: Unhealthy, SubHealth, and Health.FalseString
workerIdID of the machine where the task is mounted.FalseString
workerIpIP address of the machine where the task is mounted.FalseString
clusterIdID of the cluster where the task is mounted.FalseLong
dataDelayMsDelay (in milliseconds).FalseLong
nextFireTimeTime of the next trigger.FalseString
startTriggerTimeTime of the first trigger after starting.FalseString
firstHeartbeatSendTimeTime of the first heartbeat sent after starting.FalseString

Response Example

{
"requestId": "8e2e34f4-2cb8-11ec-a410-735664430ce2",
"code": "1",
"msg": "request success",
"data": {
"dataJobId": 517,
"dataJobName": "canal1v004a007dd",
"dataJobDesc": "zzzz",
"userName": "liqiang",
"dataJobType": "SYNC",
"dataTaskState": "FULL",
"currTaskStatus": "RUNNING",
"sourceDsVO": {
"id": 61,
"gmtCreate": "2021-09-10T03:42:39.000+0000",
"gmtModified": "2021-09-10T03:58:30.000+0000",
"uid": "4503980488230169",
"owner": "liqiang",
"deployType": "SELF_MAINTENANCE",
"region": "customer",
"dataSourceType": "MySQL",
"privateHost": "127.0.0.1:3306",
"publicHost": "",
"hostType": "PRIVATE",
"instanceDesc": "local_source",
"version": "5.7.27-log",
"instanceId": "my-6716s8rryux1366",
"autoCreateAccount": "NOT_CREATE",
"schemaJson": null,
"consoleJobId": 0,
"consoleTaskState": null,
"accountName": "origin",
"lifeCycleState": "CREATED",
"securityType": "USER_PASSWD"
},
"targetDsVO": {
"id": 1,
"gmtCreate": "2021-03-26T04:07:23.000+0000",
"gmtModified": "2021-09-14T11:11:39.000+0000",
"uid": "4503980488230169",
"owner": "liqiang",
"deployType": "SELF_MAINTENANCE",
"region": "customer",
"dataSourceType": "MySQL",
"privateHost": "127.0.0.1:4306",
"publicHost": "",
"hostType": "PRIVATE",
"instanceDesc": "local target",
"version": "5.7.27-log",
"instanceId": "my-dc1l0m2cfdtrrhq",
"autoCreateAccount": "NOT_CREATE",
"schemaJson": null,
"consoleJobId": 0,
"consoleTaskState": null,
"accountName": "root",
"lifeCycleState": "CREATED",
"securityType": "USER_PASSWD"
},
"sourceSchema": null,
"targetSchema": null,
"mappingConfig": null,
"filterDdl": false,
"structMigration": false,
"initialSync": true,
"shotTermSync": false,
"shotTermNum": 0,
"gmtCreated": "2021-10-14T06:20:06.000+0000",
"dataTasks": [
{
"dataTaskId": 1071,
"gmtCreate": null,
"gmtModified": null,
"dataTaskType": "FULL",
"dataTaskName": "canal1v004a007dd_FULL",
"dataTaskStatus": "RUNNING",
"dataJobId": 517,
"dataJobName": null,
"filterDdl": false,
"checkOnce": false,
"checkPeriod": false,
"fullPeriod": false,
"fullPeriodCronExpr": null,
"checkPeriodCronExpr": null,
"lastCheckTime": null,
"fullJvmHeapMb": 2048,
"incrementJvmHeapMb": 2048,
"checkJvmHeapMb": 2048,
"taskPosition": "{\"dataTaskId\":1071,\"gmtCreate\":1634192406000,\"gmtModified\":1634192406000,\"id\":1071,\"totalToTrans\":0,\"trans\":0,\"transPercent\":0.00}",
"healthLevel": "Unhealthy",
"workerId": 1,
"workerIp": "192.168.0.133",
"clusterId": 1,
"dataDelayMs": 0,
"nextFireTime": null,
"startTriggerTime": "2021-10-14T06:25:34.000+0000",
"firstHeartbeatSendTime": null
},
{
"dataTaskId": 1072,
"gmtCreate": null,
"gmtModified": null,
"dataTaskType": "INCREMENT",
"dataTaskName": "canal1v004a007dd_INCREMENT",
"dataTaskStatus": "INIT",
"dataJobId": 517,
"dataJobName": null,
"filterDdl": false,
"checkOnce": false,
"checkPeriod": false,
"fullPeriod": false,
"fullPeriodCronExpr": null,
"checkPeriodCronExpr": null,
"checkPeriodNum": 0,
"lastCheckTime": null,
"fullJvmHeapMb": 2048,
"incrementJvmHeapMb": 2048,
"checkJvmHeapMb": 2048,
"taskPosition": "{\"dataDelayMillis\":0,\"dataTaskId\":1072,\"delayMillis\":764819,\"filePosition\":0,\"gmtCreate\":1634192406000,\"gmtModified\":1634192406000,\"id\":1072,\"maxPositionTimestamp\":0,\"positionTimestamp\":1634192406589,\"serverId\":0}",
"healthLevel": "Health",
"workerId": 1,
"workerIp": "192.168.0.133",
"clusterId": 1,
"dataDelayMs": 0,
"nextFireTime": null,
"startTriggerTime": "9999-09-09T02:00:00.000+0000",
"firstHeartbeatSendTime": null
}
],
"fsmId": 446,
"fsmActive": true,
"consoleJobId": 1094,
"consoleTaskState": "SUCCESS",
"childJobs": [],
"lifeCycleState": "CREATED",
"srcSchemaLessFormat": null,
"dstSchemaLessFormat": null,
"dstDsCaseSensitive": true,
"haveException": false
}
}