查询对象对比任务概览
功能介绍
查询对象对比任务概览。
URI
GET /v3/{project_id}/jobs/{job_id}/object/compare
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
租户在某一Region下的Project ID。 获取方法请参见获取项目ID。 |
|
job_id |
是 |
String |
任务ID。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
Content-Type |
是 |
String |
指定类型为application/json。 缺省值:application/json |
|
X-Auth-Token |
是 |
String |
从IAM服务获取的用户Token。 |
|
X-Language |
否 |
String |
请求语言类型。 缺省值:en-us 枚举值:
|
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
create_time |
String |
对比任务创建时间,UTC时间,例如:2024-04-09T07:00:57Z。 |
|
start_time |
String |
对比任务开始时间,UTC时间,例如:2024-04-09T07:00:57Z。 |
|
status |
String |
对比任务状态。 取值:
|
|
export_status |
String |
生成对比结果报告文件的状态:
|
|
report_remain_seconds |
Long |
对比结果报告文件有效期剩余时间,单位为秒,报告未生成时返回-1。 |
|
compare_job_id |
String |
对比任务ID。 |
|
error_msg |
String |
失败原因。 |
|
compare_result |
Array of objects |
对比结果。 详情请参见表4。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
type |
String |
对象类型: 取值:
|
|
source_count |
Long |
该类型的对象在源库的个数。 |
|
target_count |
Long |
该类型的对象在目标库的个数。 |
|
status |
Integer |
对比结果,0为不一致,2为一致,3为未完成。 |
请求示例
查询对象对比任务概览。
https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/f8688cfa-4e05-406f-a2e6-37a773cjb20y/object/compare
响应示例
状态码: 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"
}
状态码: 400
Bad Request
{
"error_code" : "DRS.10000010",
"error_msg" : "Task not found. Check the task ID."
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
错误码
请参见错误码。