Querying Task Details in Batches
Function
This API is used to query task details in batches by task ID.
Constraints
You can call a maximum of 10 APIs in batches.
URI
POST /v3/{project_id}/jobs/batch-detail
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 |
Querying task details in batches |
page_req |
No |
Object |
Pagination information. For details, see Table 4. |
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 objects |
Task details. For details, see Table 6. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Task ID. |
parent_id |
String |
Parent task ID. |
name |
String |
Task name. |
status |
String |
Task status.
Enumerated values:
|
description |
String |
Description. |
create_time |
String |
Creation time, in timestamp format. |
task_type |
String |
Task mode. Values:
|
source_endpoint |
Object |
Source database information. For details, see Table 7. |
dmq_endpoint |
Object |
DMQ information body. For details, see Table 7. |
source_sharding |
Array of objects |
Information about the physical source database. For details, see Table 7. |
target_endpoint |
Object |
Information body of the destination database. For details, see Table 7. |
net_type |
String |
Network type. Values:
|
failed_reason |
String |
Failure cause. |
inst_info |
Object |
Replication instance information. For details, see Table 9. |
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 objects |
Migration speed limit. For details, see Table 10. |
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. |
error_message |
String |
Error message. |
target_root_db |
Object |
Information about the root node database of the destination instance. For details, see Table 11. |
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 |
Object |
Exception notification settings. For details, see Table 12. |
is_multi_az |
Boolean |
Whether the task is a primary/standby task. |
az_name |
String |
AZ name of the node. |
master_az |
String |
Primary AZ of the primary/standby task. |
slave_az |
String |
Standby AZ of the primary/standby task. |
node_role |
String |
Primary/Standby role of a task. |
incre_start_position |
String |
Start point of an incremental task. |
period_order |
Object |
Yearly/Monthly information. For details, see Table 14.
NOTE:
This parameter is returned only for yearly/monthly tasks. |
object_infos |
Array of objects |
Synchronized object information. For details, see Table 15. |
original_job_direction |
String |
Task direction. Values:
|
data_transformation |
Object |
Data filtering configuration information. For details, see Table 16. |
tags |
Array of objects |
Task tag. For details, see Table 21. |
public_ip_list |
Array of objects |
Information about a specified EIP. For details, see Table 22. |
bind_public_ip_state |
String |
Whether an EIP is successfully bound. |
children |
Array of objects |
In the case of multiple tasks, if an EIP fails to be bound to a subtask, the subtask information is returned. For details, see Table 23. |
is_open_fast_clean |
Boolean |
Specifies whether to enable binlog clearing for RDS for MySQL or RDS for MariaDB. |
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 instance. |
inst_id |
String |
DB instance ID. This parameter is mandatory when the database is a cloud instance, for example, an RDS 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 |
ID of the project to which the DB instance belongs. |
db_name |
String |
The service name. This parameter is mandatory when the source database is an Oracle database. The database name can be a maximum of 128 characters in length and cannot contain the following special characters: !<>&'\" |
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 |
RDS instance name. |
ip |
String |
Database IP address. |
mongo_ha_mode |
String |
Mongo HA mode. |
safe_mode |
Integer |
Running mode of an MRS cluster. Values:
|
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 |
Boolean |
Whether SSL is enabled. |
topic |
String |
Kafka topic name. |
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: Sharding4.0+ |
kafka_security_config |
Object |
This parameter is only for Kafka security authentication. For details, see Table 8. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Security protocol. This parameter is mandatory for security authentication. The corresponding field for Kafka is security.protocol.
Enumerated values:
|
trust_store_key_name |
String |
Certificate name. This parameter is mandatory when the security protocol is set to SSL or SASL_SSL. |
trust_store_key |
String |
Value of the security certificate after Base64 transcoding. This parameter is mandatory when the security protocol is set to SSL or SASL_SSL. |
trust_store_password |
String |
Certificate password. This parameter is mandatory when a password is set for the certificate. |
endpoint_algorithm |
String |
Host name endpoint identification algorithm, which specifies the endpoint identification algorithm for verifying the server host name using the server certificate. If this parameter is left blank, host name verification is disabled. The corresponding field for Kafka is ssl.endpoint.identification.algorithm. |
sasl_mechanism |
String |
SASL mechanism used for client connection. The corresponding field for Kafka is sasl.mechanism. The values are as follows:
|
delegation_tokens |
Boolean |
Whether to use token authentication. This parameter is valid only when the security protocol is set to SASL_SSL or SASL_PLAINTEXT and the SASL mechanism is set to SCRAM-SHA-256 or SCRAM-SHA-512. |
enable_key_store |
Boolean |
Whether to enable two-way SSL authentication. |
key_store_key |
String |
Keystore certificate. This parameter is mandatory when two-way SSL authentication is enabled. |
key_store_key_name |
String |
Keystore certificate name. This parameter is mandatory when two-way SSL authentication is enabled. |
key_store_password |
String |
Keystore certificate password. This parameter is mandatory when a password is set for the certificate. The corresponding field for Kafka is ssl.keystore.password. |
set_private_key_password |
Boolean |
Whether to set the keystore private key password. The default value is false. |
key_password |
String |
Keystore private key password. This parameter is mandatory when two-way SSL authentication is enabled and set_private_key_password is set to true. The corresponding field for Kafka is ssl.key.password. |
Parameter |
Type |
Description |
---|---|---|
engine_type |
String |
Engine type of a DRS task. Values:
|
inst_type |
String |
DB instance type. Value: high |
ip |
String |
Private IP address of the replication instance. |
public_ip |
String |
EIP of the replication instance. |
start_time |
String |
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 objects |
SMN information. For details, see Table 13. |
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:
|
Parameter |
Type |
Description |
---|---|---|
status |
String |
Order status. |
order_id |
String |
Order ID. |
charging_mode |
Integer |
Billing mode. Values:
|
period_type |
Integer |
Subscription period type. Values:
|
period_num |
Integer |
Number of subscription periods. Values:
|
is_auto_renew |
Integer |
Whether auto renewal is enabled. Values:
|
eff_time |
String |
Time when the resource takes effect ( time when the resource is created). The value is UTC time in yyyy-MM-ddTHH:mm:ssZ (2016-06-28T00:00:00Z) format. |
exp_time |
String |
Time when the resource expires. If the resource is renewed, it indicates the expiration time after the renewal. The value is UTC time in yyyy-MM-ddTHH:mm:ssZ (2016-03-28T00:00:00Z) format. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
When type is set to database, this parameter indicates the database name. If type is set to table or view, set the field value by referring to the example. |
parent_id |
String |
When type is set to table or view, this parameter indicates the database name. |
type |
String |
Type. Values:
|
name |
String |
Database object name, including the database name, table name, and view name. |
alias_name |
String |
Alias, which is the new mapped name. |
Parameter |
Type |
Description |
---|---|---|
total_count |
Long |
Total number of data filtering criteria. |
filter_conditions |
Array of objects |
Data filtering configuration information. Constraints: A maximum of 10,000 data filtering criteria can be returned. For details, see Table 17. |
Parameter |
Type |
Description |
---|---|---|
transformation_info |
Object |
Common configuration for data filtering. For details, see Table 19. |
config_transformation |
Object |
Advanced configuration for data filtering. For details, see Table 20. |
data_transformation_object_infos |
Array of objects |
Data filtering object information. For details, see Table 18. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
Database object, database table name, and processing type. For example, the format is db1-*-*-tb1-*-*---conditionFilter--. |
data_transformation_type |
No |
String |
|
schema_name |
No |
String |
Name of the schema for data processing. |
table_name |
No |
String |
Name of the table for data processing. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
transformation_type |
Yes |
String |
|
value |
Yes |
String |
Filter criteria. The processing rule value is a SQL statement, and the configuration rule value is config. The value contains a maximum of 256 characters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
db_table_name |
Yes |
String |
Database-name.Table-name, for example, lxl_test1.test_1, where lxl_test1 is the database name and test_1 is the table name. |
db_name |
Yes |
String |
Database name. The value contains a maximum of 256 characters. |
table_name |
Yes |
String |
Table name. The value contains a maximum of 256 characters. |
col_names |
Yes |
String |
Column name. The value contains a maximum of 256 characters. |
prim_key_or_index |
Yes |
String |
Primary key or unique index. The value contains a maximum of 256 characters. |
indexs |
Yes |
String |
Index that requires optimization. The value contains a maximum of 256 characters. |
values |
Yes |
String |
Filtering criteria. The value contains a maximum of 256 characters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key |
Yes |
String |
Tag key. |
value |
Yes |
String |
Tag value. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
ID of a specified EIP. |
public_ip |
String |
EIP. |
type |
String |
Type of a task with an EIP bound.
Enumerated values:
|
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-west-101", "db_type" : "mysql", "db_port" : 3306, "ssl_link" : false, "project_id" : "054ba152d480d55b2f5dc0069e7ddef0", "db_user" : "root" }, "target_endpoint" : { "ip" : "172.21.176.219", "region" : "eu-west-101", "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" : "******", "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, "original_job_direction": "up", "is_open_fast_clean": true, "object_infos":[{ "id":"test", "type":"database", "name":"test", "select":"true" },{ "id":"test-*-*-table01", "type":"table", "name":"table01", "select":"true", "parent_id":"test" }] }, { "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-west-101", "db_type" : "mysql", "db_port" : 3306, "ssl_link" : false, "project_id" : "054ba152d480d55b2f5dc0069e7ddef0", "db_user" : "root" }, "target_endpoint" : { "ip" : "192.168.0.131", "region" : "eu-west-101", "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, "tags": [{ "key1" : "value1", "key2" : "value2" }], "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, "original_job_direction": "up", "object_infos":[{ "id":"test2", "type":"database", "name":"test2", "select":"true" },{ "id":"test2-*-*-table02", "type":"table", "name":"table02", "select":"true", "parent_id":"test2" }] } ], "data_transformation": { "total_count": 2, "filter_conditions": [ { "data_transformation_object_infos": [ { "id": "test02-*-*-table02-*-*---conditionFilter--", "db_name": "test02", "table_name": "table02", "data_transformation_type": "contentConditionalFilter" } ], "transformation_info": { "value": "id1<1", "transformation_type": "contentConditionalFilter" } }, { "data_transformation_object_infos": [ { "id": "test02-*-*-table01-*-*---configConditionFilter--", "db_name": "test02", "table_name": "test01", "data_transformation_type": "configConditionalFilter" } ], "transformation_info": { "value": "config", "transformation_type": "configConditionalFilter" }, "config_transformation": { "indexs": "id", "values": "id <= 6", "db_table_name": "test02.table01", "db_name": "test02", "table_name": "table01", "col_names": "id", "prim_key_or_index": "id" } } ] } }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
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.