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.
URI
POST /v3/{project_id}/jobs/batch-precheck-result
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
The content type. The default value is application/json. |
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
X-Language |
No |
String |
Request language type Default value: en-us Values:
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
jobs |
Yes |
Array of strings |
Request for querying pre-check results in batches. The value cannot be empty. The values must comply with the UUID rule. The task ID must be unique. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
results |
Array of objects |
Response body set for querying pre-check results in batches. For details, see Table 5. |
count |
Integer |
Total number of records. |
Parameter |
Type |
Description |
---|---|---|
precheck_id |
String |
ID of the task for querying the pre-check result. |
result |
Boolean |
Whether the pre-check items are passed. true: indicates that the pre-check is passed. The task can be started only after the pre-check is passed. |
process |
String |
Pre-check progress, in percentage. |
total_passed_rate |
String |
Percentage of passed pre-checks. |
rds_instance_id |
String |
RDS DB instance ID. |
job_direction |
String |
Task direction. Values:
|
precheck_result |
Array of object |
Pre-check results. For details, see Table 6. |
error_msg |
String |
Error message. |
error_code |
String |
Error code. |
Parameter |
Type |
Description |
---|---|---|
item |
String |
Check item. |
result |
String |
Check results. Values:
|
failed_reason |
String |
Failure cause. |
data |
String |
Encrypted data. |
raw_error_msg |
String |
Row error message. |
group |
String |
Check item group. |
failed_sub_jobs |
Array of objects |
Information about failed subtasks. For details, see Table 7. |
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 |
Error Code
For details, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot