Updated on 2026-09-07 GMT+08:00

Querying Pre-check Results in Batches

Function

This API is used to query the pre-check results of tasks in batches.

Debugging

You can debug the API in API Explorer to support automatic authentication. API Explorer can automatically generate and debug example SDK code.

Constraints

  • This API can be called only when the pre-check API is invoked.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions and Supported Actions.

URI

POST /v3/{project_id}/jobs/batch-precheck-result

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

For details about how to obtain the project ID, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Definition

MIME type of the request body. Use the default value application/json. For APIs used to upload objects or images, the value varies depending on the flow type.

Constraints

N/A

Range

application/json

Default Value

application/json

X-Auth-Token

Yes

String

Definition

User token obtained from IAM. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. The token is the value of X-Subject-Token in the response header.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Request language type.

Constraints

N/A

Range

  • en-us: English
  • zh-cn: Chinese

Default Value

en-us

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

jobs

Yes

Array of strings

Definition

Task IDs for batch query. This parameter is used to specify one or more tasks whose pre-check results need to be queried.

Constraints

  • The value cannot contain empty objects.

  • The value of each element in the set must strictly comply with the UUID rule.

  • The task ID must be unique.

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

results

Array of objects

Definition

Response body set for querying pre-check results in batches, which includes the pre-check result details of each task.

For details, see Table 5.

count

Integer

Definition

Total number of returned task records, which is consistent with the length of the results array.

Constraints

N/A

Range

N/A

Table 5 Data structure description of field results

Parameter

Type

Description

precheck_id

String

Definition

ID of the task for querying the pre-check result.

Constraints

N/A

Range

N/A

result

Boolean

Definition

Whether the pre-check is passed.

Constraints

N/A

Range

  • true: The pre-check is passed. The task can be started only after the pre-check is passed.

  • false: The pre-check failed. You need to check the failed items in precheck_result.

process

String

Definition

Pre-check progress (%), which indicates the execution progress of the pre-check task.

Constraints

N/A

Range

0%–100%

total_passed_rate

String

Definition

Pre-check pass rate, which indicates the percentage of passed pre-check items.

Constraints

N/A

Range

0%–100%

rds_instance_id

String

Definition

RDS instance ID, which identifies the associated Huawei Cloud RDS DB instance.

Constraints

N/A

Range

N/A

job_direction

String

Definition

Migration direction of a task.

Constraints

N/A

Range

  • up: to-the-cloud scenarios and DR scenarios where the current cloud is the standby.
  • down: out-of-cloud scenarios and DR scenarios where the current cloud is the active
  • non-dbs: between self-built databases

precheck_result

Array of object

Definition

Pre-check results.

For details, see Table 6.

error_msg

String

Definition

Error message returned if the task fails.

Constraints

N/A

Range

N/A

error_code

String

Definition

Error code returned if the task fails.

Constraints

N/A

Range

The value is in the format of DRS.XXXXXX.

Table 6 Data structure description of field precheck_result

Parameter

Type

Description

item

String

Definition

Name of a pre-check item, which is used to identify a specific item in the pre-check.

Constraints

N/A

Range

N/A

result

String

Definition

Pre-check result, which indicates whether the item passes the pre-check.

Constraints

N/A

Range

  • PASSED
  • ALARM
  • FAILED

failed_reason

String

Definition

Failure cause of a pre-check item. It is the specific failure description returned when the check result is FAILED or ALARM.

Constraints

N/A

Range

N/A

data

String

Definition

Encrypted data of a pre-check item, including the detailed check data of the item, which is returned in JSON format.

Constraints

N/A

Range

N/A

raw_error_msg

String

Definition

Original error message, which is the original error description generated during the pre-check.

Constraints

N/A

Range

N/A

group

String

Definition

Check item group, which is used to display pre-check items by category.

Constraints

N/A

Range

N/A

failed_sub_jobs

Array of objects

Definition

Information set of failed subtasks, which includes details about the failed subtasks during the pre-check.

For details, see Table 7.

Table 7 Data structure description of field failed_sub_jobs

Parameter

Type

Description

id

String

Definition

Failed subtask ID, which uniquely identifies a failed subtask.

Constraints

N/A

Range

N/A

name

String

Definition

Name of a failed subtask, which is used to identify a failed subtask.

Constraints

N/A

Range

N/A

check_result

String

Definition

Pre-check result of a failed subtask, which indicates whether the subtask passes the pre-check.

Constraints

N/A

Range

N/A

Example Request

  • Querying pre-check results for a DDS real-time migration task
    https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-precheck-result
    
    {
      "jobs" : [ "a281f62f-4631-45d6-a2d3-679a9f4jb105" ]
    }
  • Querying pre-check results for a MySQL real-time migration task
    https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-precheck-result
    
    {
      "jobs" : [ "140b5236-88ad-43c8-811c-1268453jb101" ]
    }

Example Response

Status code: 200

OK

  • Example response for querying the pre-check result during real-time MySQL migration:
    {
      "count" : 1,
      "results" : [ {
        "result" : true,
        "process" : "100%",
        "precheck_id" : "140b5236-88ad-43c8-811c-1268453jb101",
        "total_passed_rate" : "100%",
        "rds_instance_id" : "e05a3679efe241d8b5dee80b17c1a863in01",
        "job_direction" : "up",
        "precheck_result" : [ {
          "item" : "dstDbDiskSize",
          "result" : "PASSED",
          "data" : "{\"diskSizeTimes\":\"1.5\",\"dstVolumeSize\":\"37660000000\",\"srcIndexSize\":0,\"size\":\"0\",\"srcIndexAmount\":0}",
          "group" : "db_disk_size"
        }, {
          "item" : "checkIncreSrcDbExistedInDstDb",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "dbCharacterSetConsistency",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "dbClockConsistency",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "dbCollationServerConsistency",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "dbIsolationLevelConsistency",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "dbParamConsistency",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "dbServerUuidConsistency",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "dstMaxAllowedPacketCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "hasForeignKeyOnUnselectedTable",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "innodbStrictModeConsistency",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "isUserRequireSslLink",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "sqlModeConsistency",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "sqlModeNoEngine",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcBinlogFormatCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcBinlogRowImageCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcDbBinlogExpireLogsDays",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcDbBinlogIsOff",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcDbExistUnsupportEngineTable",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcDbIndexKeyLength",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcDbNameContainsUnsupportedSymbols",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcDbServerIdCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcDstTableNameCaseSensitiveCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcHasNoPkTableWhenTgtHasInvisiblePk",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcRoutinesWithoutPrivilegeCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcTableNameContainsNonAscii",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcTriggerAndEventCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcViewNameContainsNonAscii",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srclogSlaveUpdatesCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "userRequirementIsEnoughForDefiner",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "userSelectObjectsCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "dstStatusCheck",
          "result" : "PASSED",
          "data" : "",
          "group" : "db_target_status",
          "failed_reason" : ""
        }, {
          "item" : "dstDbPrivilegesIsEnough",
          "result" : "PASSED",
          "group" : "db_user_privilege"
        }, {
          "item" : "srcDbPrivilegesIsEnoughForIncre",
          "result" : "PASSED",
          "group" : "db_user_privilege"
        }, {
          "item" : "dbVersionMeetRequirement",
          "result" : "PASSED",
          "group" : "db_version"
        }, {
          "item" : "dstDbVersionSupport",
          "result" : "PASSED",
          "group" : "db_version"
        }, {
          "item" : "srcDbVersionSupport",
          "result" : "PASSED",
          "group" : "db_version"
        }, {
          "item" : "dstDbConnection",
          "result" : "PASSED",
          "group" : "network"
        }, {
          "item" : "srcDbConnection",
          "result" : "PASSED",
          "group" : "network"
        } ]
      } ]
    }
  • Example response for querying the pre-check result during real-time DDS migration:
    {
      "count" : 1,
      "results" : [ {
        "result" : true,
        "process" : "100%",
        "precheck_id" : "a281f62f-4631-45d6-a2d3-679a9f4jb105",
        "total_passed_rate" : "100%",
        "rds_instance_id" : "3cadd5a0ef724f55ac7fa5bcb5f4fc5fin02",
        "job_direction" : "up",
        "precheck_result" : [ {
          "item" : "dstDbDiskSize",
          "result" : "PASSED",
          "data" : "{'size': '5263360', 'dstVolumeSize':'19089431762', 'diskSizeTimes':'1.5'}",
          "group" : "db_disk_size"
        }, {
          "item" : "srcAndDstCappedCollConsistency",
          "result" : "PASSED",
          "group" : "db_object_conflict_check"
        }, {
          "item" : "srcCollAlreadyExistedInDstColl",
          "result" : "PASSED",
          "group" : "db_object_conflict_check"
        }, {
          "item" : "srcViewAlreadyExistedInDstView",
          "result" : "PASSED",
          "group" : "db_object_conflict_check"
        }, {
          "item" : "rolesDependentCheck",
          "result" : "PASSED",
          "group" : "db_object_dependency_check"
        }, {
          "item" : "usersDependentCheck",
          "result" : "PASSED",
          "group" : "db_object_dependency_check"
        }, {
          "item" : "srcCollHasTtlIndex",
          "result" : "ALARM",
          "data" : "{\"srcHasTtlIndexColls\":\"fastunit.ttlsuoyin\"}",
          "group" : "db_params",
          "failed_reason" : "SRC_HAS_TTL_INDEXES"
        }, {
          "item" : "dbSslConsistency",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "dstChunkNumCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "mongoTypeFitTransferMode",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcCollIndexNumCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcCollNameContainsUnsupportedSymbols",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcDbInstanceIsEmpty",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcDbNameContainsUnsupportedSymbols",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "srcIdIndexCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "userSelectObjectsCheck",
          "result" : "PASSED",
          "group" : "db_params"
        }, {
          "item" : "dstStatusCheck",
          "result" : "PASSED",
          "data" : "",
          "group" : "db_target_status",
          "failed_reason" : ""
        }, {
          "item" : "dstDbPrivilegesIsEnough",
          "result" : "PASSED",
          "group" : "db_user_privilege"
        }, {
          "item" : "srcDbPrivilegesIsEnough",
          "result" : "PASSED",
          "group" : "db_user_privilege"
        }, {
          "item" : "dbVersionMeetRequirement",
          "result" : "PASSED",
          "group" : "db_version"
        }, {
          "item" : "dstDbVersionSupport",
          "result" : "PASSED",
          "group" : "db_version"
        }, {
          "item" : "srcDbVersionSupport",
          "result" : "PASSED",
          "group" : "db_version"
        }, {
          "item" : "dstDbConnection",
          "result" : "PASSED",
          "group" : "network"
        }, {
          "item" : "srcDbConnection",
          "result" : "PASSED",
          "group" : "network"
        }, {
          "item" : "srcShardKeyConfiguration",
          "result" : "ALARM",
          "data" : "{\"notConfigShardIndexColls\":\"ycsb.usertable,mgo.mycollection7,mgo.mycollection9,mgo.mycollection5,mgo.mycollection4,mgo.mycollection3,mgo.mycollection,mgo.mycollection8,mgo.mycollection2,mgo.mycollection6,testdb3.testuk,testdb3.coll2,testdb3.coll6,testdb3.coll1,testdb3.Coll1,testdb3.testuk2,testdb3.coll5,testdb3.coll4,testdb1.coll6,testdb1.coll1,testdb1.testuk2,testdb1.coll2,testdb1.testuk,testdb1.coll5,testdb1.coll4,testdb1.Coll1,Testdb5.coll1,Testdb5.collx,Testdb5.Coll1,fastunit.gudingjihe,fastunit.geohaystack,fastunit.coll,fastunit.weiyisuoyin,fastunit.testSpecial\\\\u4E2D\\\\u6587~!@#%^&*()_+=-[]{};:?,`,fastunit.log,fastunit.twoD,fastunit.lianhesuoyin,fastunit.xishusuoyin,fastunit.quanwensuoyin,fastunit.ttlsuoyin,fastunit.putongsuoyin,fastunit.collcount,fastunit.shuzusuoyin,fastunit.twodsphere,fastunit.qiantaowendangsuoyin,fastunit.indexpartial\"}",
          "group" : "src_info_check",
          "failed_reason" : "SRC_INSTANCE_TYPE_IS_REPLICA_SET"
        }, {
          "item" : "checkBalanceStatus",
          "result" : "PASSED",
          "group" : "src_info_check"
        }, {
          "item" : "srcMongoInstanceType",
          "result" : "PASSED",
          "group" : "src_info_check"
        } ]
      } ]
    }

Status Code

Status Code

Description

200

OK

400

Bad Request

For other statuses, see Status Code.

Error Code

For details, see Error Code.