Querying Details About an Object Comparison Task
Function
This API is used to query details about an object comparison task.
URI
GET /v3/{project_id}/jobs/{job_id}/object/compare/{compare_type}
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. |
compare_type |
Yes |
String |
Object type, which can be:
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
compare_job_id |
No |
String |
ID of a comparison task. If this parameter is not specified, the latest comparison task information is returned by default. |
limit |
No |
Integer |
Number of records displayed on each page. The maximum value is 1000. Minimum value: 1 Maximum value: 1000 Default value: 1000 |
offset |
No |
Integer |
Offset, which is the position where the query starts. The value must be no less than 0. Default value: 0 |
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 |
---|---|---|
count |
Integer |
Comparison quantity. |
compare_detail |
Array of objects |
Object comparison details. For details, see Table 5. |
Parameter |
Type |
Description |
---|---|---|
source_db_name |
String |
Source database name. |
target_db_name |
String |
Destination database name. |
source_db_value |
String |
Value in the source database. |
target_db_value |
String |
Value 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. |
error_message |
String |
Error message. |
Example Request
Querying table comparison details about an object comparison task
https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/f8688cfa-4e05-406f-a2e6-37a773cjb20y/object/compare/TABLE
Example Response
Status code: 200
OK
{ "count" : 1, "compare_detail" : [ { "source_db_value" : "tb1", "target_db_value" : "tb1", "source_db_name" : "db1", "target_db_name" : "db1", "status" : 2 } ] }
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