Querying the Overview of an Object Comparison Task
Function
This API is used to query the overview of an object comparison task.
URI
GET /v3/{project_id}/jobs/{job_id}/object/compare
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. For details, see Obtaining a Project ID. |
job_id |
Yes |
String |
Task 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 Enumerated values:
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
create_time |
String |
Time when a comparison task is created. The value is a UTC time, for example, 2024-04-09T07:00:57Z. |
start_time |
String |
Time when a comparison task starts. The value is a UTC time, for example, 2024-04-09T07:00:57Z. |
status |
String |
Status of a comparison task. Value:
|
export_status |
String |
Status of generating a comparison result file. The values are as follows:
|
report_remain_seconds |
Long |
Remaining validity period of a comparison result file, in seconds. If the report is not generated, -1 is returned. |
compare_job_id |
String |
ID of a comparison task. |
error_msg |
String |
Failure cause. |
compare_result |
Array of objects |
Comparison result. For details, see Table 4. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Object type. The values are as follows:
|
source_count |
Long |
Number of objects of this type in the source database. |
target_count |
Long |
Number of objects of this type in the destination database. |
status |
Integer |
Comparison result. The value 0 indicates that the result is inconsistent, the value 2 indicates that the result is consistent, and the value 3 indicates the comparison is incomplete. |
Example Request
Querying the overview of an object comparison task
https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/f8688cfa-4e05-406f-a2e6-37a773cjb20y/object/compare
Example Response
Status code: 200
OK
{ "status" : "SUCCESSFUL", "create_time" : "2024-04-02T06:17:56Z", "compare_result" : [ { "type" : "DB", "status" : 2, "source_count" : 2, "target_count" : 2 }, { "type" : "TABLE", "status" : 2, "source_count" : 2, "target_count" : 2 }, { "type" : "INDEX", "status" : 2, "source_count" : 2, "target_count" : 2 }, { "type" : "TABLE_COLLATION", "status" : 2, "source_count" : 2, "target_count" : 2 } ], "start_time" : "2024-04-02T06:17:49Z", "export_status" : "INIT", "report_remain_seconds" : -1, "compare_job_id" : "bfcdc4d9-f0ae-4108-be42-6974d60cd1d2" }
Status code: 400
Bad Request
{ "error_code" : "DRS.10000010", "error_msg" : "Task not found. Check the task ID." }
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