Skip to main content

Query Data Comparison Difference Details

Query inconsistent record details for a specified table. You can filter results by difference type.

Request URL: /openapi/v1/comparedata/result/diffDetails

Request Method: GET

Before You Call

Request Parameters

ParameterTypeRequiredDescriptionExample
taskIdStringYesData comparison main task ID.cd-tg3isu1xgs
execIdIntegerYesExecution ID of a data comparison subtask.326816
progressIdIntegerYesUnique identifier of a single table comparison result.2934527
filterIntegerNoDifference type filter. Omit this parameter to return all differences. 0 returns only records that exist on both sides but have different field values. -1 returns only records that exist on the source side but not on the target side. 1 returns only records that exist on the target side but not on the source side.0
pageSizeIntegerNoNumber of records per page. The default value is 30, and the maximum value is 100.30
pageNumberIntegerNoPage number. The default value starts from 1.1

Response Parameters

ParameterTypeDescriptionExample
successBooleanWhether the request is successful.true
requestIdStringRequest ID, which can be used for troubleshooting and tracing.Hg4d2OLN-DJJKnOZnEELv6ZUdFHc8LBG
dataObjectDifference detail object.See the field descriptions below

data Fields

ParameterTypeDescriptionExample
totalCountLongTotal number of inconsistent records in the current table that match the filter conditions.8
pageNumberIntegerReturned page number.1
pageSizeIntegerNumber of records per page.30
primaryKeyColumnsArrayList of primary key or unique key column names.["control_id"]
diffRecordsArrayList of inconsistent records.See the field descriptions below

diffRecords Fields

ParameterTypeDescriptionExample
diffTypeStringDifference type. Valid values: SOURCE_ONLY, which means the row exists only on the source side; TARGET_ONLY, which means the row exists only on the target side; and MISMATCH, which means the row exists on both sides but has different field values.MISMATCH
sourceDataObjectField values of the current record on the source side. Returned when diffType is SOURCE_ONLY or MISMATCH.{"control_id":4745,"popup_name":"full5"}
targetDataObjectField values of the current record on the target side. Returned when diffType is TARGET_ONLY or MISMATCH.{"control_id":4745,"popup_name":"full6"}

Request Example

{
"taskId": "cd-tg3isu1xgs",
"execId": 326816,
"progressId": 2934527,
"pageNumber": 1,
"pageSize": 30
}

Successful Invocation Example

{
"success": true,
"requestId": "Hg4d2OLN-DJJKnOZnEELv6ZUdFHc8LBG",
"data": {
"totalCount": 8,
"pageNumber": 1,
"pageSize": 30,
"primaryKeyColumns": [
"control_id"
],
"diffRecords": [
{
"diffType": "TARGET_ONLY",
"targetData": {
"control_id": 3,
"popup_name": "full3",
"app_id": "eufy_security"
}
},
{
"diffType": "MISMATCH",
"sourceData": {
"control_id": 4745,
"popup_name": "full5",
"app_id": "eufy_security"
},
"targetData": {
"control_id": 4745,
"popup_name": "full6",
"app_id": "eufy_security"
}
}
]
}
}