Querying Task Details in Batches¶
Function¶
This API is used to query task details in batches by task ID.
URI¶
POST /v3/{project_id}/jobs/batch-detail
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID of a tenant in a region |
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 | Querying task details in batches |
page_req | No | PageReq object | Pagination information. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
cur_page | No | Integer | Current page number, which cannot exceed the maximum number of pages. (Number of pages = Number of transferred job IDs/Number of tasks on each page)
|
per_page | No | Integer | Number of items on each page. If this parameter is set to 0, all items are obtained.
|
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
count | Integer | Number of tasks. |
results | Array of QueryJobResp objects | Task details. |
Parameter | Type | Description |
---|---|---|
id | String | Task ID. |
parent_id | String | Parent task ID. |
name | String | Task name. |
status | String | Task status. Values:
|
description | String | Description. |
create_time | String | Creation time, in timestamp format. |
task_type | String | Task mode. Values:
|
source_endpoint | Endpoint object | Source database information. |
dmq_endpoint | Endpoint object | DMQ information body. |
source_sharding | Array of Endpoint objects | Information about the physical source database. |
target_endpoint | Endpoint object | Information body of the destination database. |
net_type | String | Network type. Values:
|
failed_reason | String | Failure cause. |
inst_info | InstInfo object | Replication instance information. |
actual_start_time | String | Start time, in timestamp format. |
full_transfer_complete_time | String | Full migration completion time, in timestamp format. |
update_time | String | Update time, in timestamp format. |
job_direction | String | Task direction. Values:
|
db_use_type | String | Migration scenario Values:
|
need_restart | Boolean | Whether the instance needs to be restarted. |
is_target_readonly | Boolean | Whether the destination instance is restricted to read-only. |
conflict_policy | String | Conflict policy. Values:
|
filter_ddl_policy | String | DDL filtering policy. Values:
|
speed_limit | Array of SpeedLimitInfo objects | Migration speed limit. |
schema_type | String | Migration schemes. Values:
|
node_num | String | The number of nodes. |
object_switch | Boolean | Whether to select objects. |
master_job_id | String | Main task ID |
full_mode | String | Full snapshot mode. |
struct_trans | Boolean | Whether to migrate the structure. |
index_trans | Boolean | Whether to migrate indexes. |
replace_definer | Boolean | Whether to replace the definer with the user of the destination database. |
migrate_user | Boolean | Whether to migrate users. |
sync_database | Boolean | Whether to perform database-level synchronization. |
error_code | String | Error code, which is optional and indicates the returned information about the failure status. |
error_message | String | Error message, which is optional and indicates the returned information about the failure status. |
target_root_db | DefaultRootDb object | Information about the root node database of the destination instance. |
az_code | String | AZ where the node is located. |
vpc_id | String | VPC to which the node belongs. |
subnet_id | String | Subnet where the node is located. |
security_group_id | String | Security group to which the node belongs. |
multi_write | Boolean | Whether the task is a multi-active DR task. The value is true when the task is a dual-active DR task. |
support_ip_v6 | Boolean | Whether IPv6 is supported |
inherit_id | String | Inherited task ID. |
gtid | String | GTID set of breakpoints. |
alarm_notify | QuerySmnInfoResp object | Exception notification settings. |
is_multi_az | Boolean | Whether the task is a cross-AZ synchronization task. |
az_name | String | AZ name of the node. |
master_az | String | Primary AZ of the cross-AZ task. |
slave_az | String | Standby AZ of the cross-AZ task. |
node_role | String | Primary/Standby role of a task. |
incre_start_position | String | Start point of an incremental task. |
Parameter | Type | Description |
---|---|---|
db_type | String | Database type. Values:
|
az_code | String | Code of the AZ where the database is located. |
region | String | Region where the DB instance is located. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. |
inst_id | String | DB instance ID. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. |
vpc_id | String | ID of the VPC where the database is located. |
subnet_id | String | ID of the subnet where the database is located. |
security_group_id | String | ID of the security group to which the database belongs. |
project_id | String | Project ID of an RDS DB instance. |
db_password | String | Database password. |
db_port | Integer | Database port. The value is an integer ranging from 1 to 65535. |
db_user | String | Database user. |
inst_name | String | The name of an RDS or GaussDB(for MySQL) instance. |
ip | String | Database IP address. |
mongo_ha_mode | String | MongoDB HA mode. |
ssl_cert_password | String | SSL certificate password. The certificate file name extension is .p12. |
ssl_cert_check_sum | String | The checksum value of the SSL certificate, which is used for backend verification. This parameter is mandatory for secure connection to the source database. |
ssl_cert_key | String | SSL certificate content, which is encrypted using Base64. |
ssl_cert_name | String | SSL certificate name. |
ssl_link | String | Whether SSL is enabled. |
cluster_mode | String | For MongoDB 4.0 or later, if the cluster instance cannot obtain the IP address of the sharded node, set source_endpoint to Sharding4.0+. Default value: Sharding4.0+ Enumerated value:
|
Parameter | Type | Description |
---|---|---|
engine_type | String | Engine type of a DRS task. Values:
|
inst_type | String | DB instance type. Values:
|
ip | String | Private IP address of the replication instance. |
public_ip | String | EIP of the replication instance. |
start_time | Integer | Scheduled start time of a replication instance task. |
status | String | Replication instance status. Values:
|
volume_size | Integer | Storage space of a replication instance. |
Parameter | Type | Description |
---|---|---|
begin | String | Start time of flow control. |
end | String | End time of flow control. |
is_utc | Boolean | Whether the UTC time is used. |
speed | String | Flow control |
Parameter | Type | Description |
---|---|---|
db_name | String | Database name. |
db_encoding | String | Encoding format |
Parameter | Type | Description |
---|---|---|
subscriptions | Array of SubscriptionInfo objects | SMN information. |
topic_name | String | Topic name. |
delay_time | Long | Subscription delay. |
rto_delay | Long | RTO delay. |
rpo_delay | Long | RPO delay. |
alarm_to_user | Boolean | Whether to notify users of alarms. |
Parameter | Type | Description |
---|---|---|
endpoints | Array of strings | SMS or email list. |
protocol | String | Notification methods. sms: SMS; email: Email. Enumerated value:
|
Example Request¶
Request for querying task details:
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-detail
{
"jobs" : [ "24834eb6-be30-464e-a299-f7aa730jb101", "140b5236-88ad-43c8-811c-1268453jb101" ],
"page_req" : {
"cur_page" : 1,
"per_page" : 10
}
}
Example Response¶
Status code: 200
OK
{
"count" : 2,
"results" : [ {
"id" : "24834eb6-be30-464e-a299-f7aa730jb101",
"name" : "DRS-3999-lws",
"status" : "STARTJOBING",
"description" : "",
"create_time" : "1608519469412",
"task_type" : "FULL_INCR_TRANS",
"source_endpoint" : {
"ip" : "172.22.74.56",
"region" : "eu-de",
"db_type" : "mysql",
"db_port" : 3306,
"ssl_link" : false,
"project_id" : "054ba152d480d55b2f5dc0069e7ddef0",
"db_user" : "root"
},
"target_endpoint" : {
"ip" : "172.21.176.219",
"region" : "eu-de",
"db_type" : "mysql",
"db_port" : 3306,
"ssl_link" : false,
"inst_id" : "3ef57dbcc8db478a9e346d26ef2575bfin01",
"project_id" : "054ba152d480d55b2f5dc0069e7ddef0",
"inst_name" : "rds-lws-target",
"db_user" : "root",
"vpc_id" : "0ff8df7b-f0e9-4b16-ac16-1db3dacb69e4",
"subnet_id" : "f857d371-2f03-4622-85f6-2b7d42d0d82c"
},
"inst_info" : {
"ip" : "172.16.213.101",
"inst_type" : "high",
"engine_type" : "mysql",
"volume_size" : 100,
"public_ip" : "10.154.219.202",
"start_time" : "0"
},
"actual_start_time" : "1608520069393",
"update_time" : "1608520068979",
"job_direction" : "up",
"db_use_type" : "migration",
"need_restart" : false,
"is_target_readonly" : true,
"speed_limit" : [ ],
"schema_type" : "Tungsten",
"object_switch" : true,
"replace_definer" : true,
"migrate_user" : false,
"az_code" : "az2xahz",
"vpc_id" : "0ff8df7b-f0e9-4b16-ac16-1db3dacb69e4",
"subnet_id" : "f857d371-2f03-4622-85f6-2b7d42d0d82c",
"security_group_id" : "d90c971b-4b9d-402c-9c59-5c239389b8dd",
"support_ip_v6" : false
}, {
"id" : "140b5236-88ad-43c8-811c-1268453jb101",
"name" : "DRS-0042-linxiaolu",
"status" : "CONFIGURATION",
"description" : "",
"create_time" : "1608366204171",
"task_type" : "FULL_INCR_TRANS",
"source_endpoint" : {
"ip" : "192.168.0.27",
"region" : "eu-de",
"db_type" : "mysql",
"db_port" : 3306,
"ssl_link" : false,
"project_id" : "054ba152d480d55b2f5dc0069e7ddef0",
"db_user" : "root"
},
"target_endpoint" : {
"ip" : "192.168.0.131",
"region" : "eu-de",
"db_type" : "mysql",
"db_port" : 3306,
"ssl_link" : false,
"inst_id" : "e05a3679efe241d8b5dee80b17c1a863in01",
"project_id" : "054ba152d480d55b2f5dc0069e7ddef0",
"inst_name" : "rds-1417-lxl",
"db_user" : "root",
"vpc_id" : "65f0391c-0582-44a6-aa50-248f97ed82e1",
"subnet_id" : "352ad828-3467-4f03-987a-c55a5a9dd417"
},
"inst_info" : {
"ip" : "192.168.0.229",
"status" : "ACTIVE",
"inst_type" : "high",
"engine_type" : "mysql",
"volume_size" : 100,
"public_ip" : "10.154.219.72",
"start_time" : "0"
},
"actual_start_time" : "1608369232412",
"full_transfer_complete_time" : "1608369510202",
"update_time" : "1608517066434",
"job_direction" : "up",
"db_use_type" : "migration",
"need_restart" : false,
"is_target_readonly" : true,
"speed_limit" : [ ],
"schema_type" : "Tungsten",
"object_switch" : false,
"replace_definer" : true,
"migrate_user" : false,
"az_code" : "az2xahz",
"vpc_id" : "65f0391c-0582-44a6-aa50-248f97ed82e1",
"subnet_id" : "352ad828-3467-4f03-987a-c55a5a9dd417",
"security_group_id" : "d90c971b-4b9d-402c-9c59-5c239389b8dd",
"support_ip_v6" : false
} ]
}
Status Code¶
Status Code | Description |
---|---|
200 | OK |
Error Code¶
For details, see Error Code.