Querying Task Details in Batches

Function

  • This API is used to query task details in batches, such as MySQL to MySQL synchronization tasks. Virtual IDs cannot be queried.
  • Learn how to authorize and authenticate this API before using it.

URI

  • URI format

    PATH:/v3/{project_id}/jobs/batch-detail

    Method: POST

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region. For details, see Obtaining a Project ID.

  • Header description
    Table 2 Header description

    Name

    Mandatory

    Description

    X-Auth-Token

    Yes

    Specifies the user token obtained from IAM. For details, see Authentication.

    X-Language

    Yes

    Specifies the request language type. The value is case-insensitive, such as en-us.

    Content-Type

    Yes

    Specifies the content type. The value is application/json.

  • Request example
    /v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-detail

Request

  • Parameter description
    Table 3 Parameter description

    Name

    Mandatory

    Type

    Description

    jobs

    Yes

    List<String>

    Specifies the list of IDs for querying task details in batches.

    Constraints:

    • The value cannot contain empty objects.
    • The value must comply with the UUID rule.
    • The task ID must be unique.
  • Request example
    {
    "jobs": [
    "9a470239-2308-4bb5-a6bc-1040402fjb21",
    "dc67695a-ee3e-49b8-a022-a099bd81jb21"
    ]
    }

Normal Response

  • Parameter description
    Table 4 Parameter description

    Name

    Type

    Description

    results

    List<QueryJobRespV3>

    Indicates the response body for querying task details in batches.

    For details, see Table 5.

    count

    Integer

    Indicates the total number of records.

    Table 5 QueryJobRespV3 field description

    Name

    Type

    Description

    id

    String

    Indicates the task ID.

    parent_id

    String

    Indicates the parent task ID.

    name

    String

    Indicates the task name.

    status

    String

    Indicates the task status.

    Valid value:

    - CREATING: The task is being created.

    - CREATE_FAILED: Creation failed

    - CONFIGURATION: The task is being configured.

    - STARTJOBING: The task is starting.

    - CREATING: The task is being created.

    - WAITING_FOR_START: The task is waiting to be started.

    - START_JOB_FAILED: The task fails to be started.

    - FULL_TRANSFER_STARTED: Full migration is in progress.

    - FULL_TRANSFER_FAILED: Full migration failed.

    - FULL_TRANSFER_COMPLETE: The full migration is complete.

    - INCRE_TRANSFER_STARTED: Incremental migration in progress

    - INCRE_TRANSFER_FAILED: Incremental migration failed.

    - RELEASE_RESOURCE_STARTED: The task is being stopped.

    - RELEASE_RESOURCE_FAILED: Stop task failed.

    - RELEASE_RESOURCE_COMPLETE: The task is stopped.

    - CHANGE_JOB_STARTED: The task is being changed.

    - CHANGE_JOB_FAILED: Change task failed.

    - CHILD_TRANSFER_STARTING: The subtask is being started.

    - CHILD_TRANSFER_STARTED: The subtask is being migrated.

    - CHILD_TRANSFER_COMPLETE: The subtask migration is complete.

    - CHILD_TRANSFER_FAILED: Migrate subtask failed.

    - RELEASE_CHILD_TRANSFER_STARTED: The subtask is being stopped.

    - RELEASE_CHILD_TRANSFER_COMPLETE: The subtask is complete.

    description

    String

    Provides supplementary information.

    create_time

    String

    Indicates the timestamp format.

    task_type

    String

    FULL_INCR_TRANS: Full and incremental migration

    source_endpoint

    EndPoint2

    Indicates the source database information.

    For details, see Table 6.

    dmq_endpoint

    EndPoint2

    Indicates the DMQ information body.

    For details, see Table 6.

    source_sharding

    EndPoint2

    Indicates the information about the physical source database.

    For details, see Table 6.

    target_endpoint

    EndPoint2

    Indicates the information body of the destination database.

    For details, see Table 6.

    net_type

    String

    The value can be cross_vpc, vpn, vpc, or eip.

    failed_reason

    String

    Indicates the cause of the failure.

    instInfo

    InstInfoV3

    Indicates the replication instance information.

    For details, see Table 7.

    actual_start_time

    String

    Indicates the startup time, in timestamp format.

    full_transfer_complete_time

    String

    Indicates the full migration completion time, in timestamp format.

    update_time

    String

    Indicates the last configuration time.

    job_direction

    String

    Indicates the migration direction.

    db_use_type

    String

    Indicates the replication scenario.

    need_restart

    Boolean

    Indicates whether the instance needs to be restarted.

    is_target_readonly

    Boolean

    Indicates whether the destination instance is restricted to read-only.

    conflict_policy

    String

    Indicates the conflict policy.

    filter_ddl_policy

    String

    Indicates the DDL filtering policy.

    speed_limit

    List<SpeedLimit>

    Indicates the migration speed limit.

    For details, see Table 8.

    schema_type

    String

    Indicates the migration plan.

    node_num

    Integer

    Indicates the number of nodes.

    object_switch

    Boolean

    Indicates the object selection.

    master_job_id

    String

    Indicates the main task ID.

    full_mode

    String

    Indicates the full snapshot mode.

    struct_trans

    Boolean

    Indicates whether to migrate the structure during synchronization.

    index_trans

    Boolean

    Indicates whether to migrate indexes during synchronization.

    replace_definer

    Boolean

    Indicates whether to replace the definer with the account of the destination database.

    migrate_user

    Boolean

    Indicates whether to migrate accounts.

    sync_database

    Boolean

    Indicates whether to perform database-level synchronization.

    error_code

    String

    Indicates the task error code.

    error_message

    String

    Indicates the error message.

    target_root_db

    DefaultRootDbV3

    Indicates the information about the root node database of the destination instance.

    For details, see Table 9.

    az_code

    String

    Indicates the AZ where the node is deployed.

    vpc_id

    String

    Indicates the VPC that the node belongs to.

    subnet_id

    String

    Indicates the subnet where the node resides.

    security_group_id

    String

    Indicates the security group that the node belongs to.

    issue_coupon

    Boolean

    Indicates whether a coupon is issued.

    multi_write

    Boolean

    Indicates whether the task is a multi-active DR task.

    support_ip_v6

    Boolean

    Indicates whether to support IPV6.

    inherit_id

    String

    Indicates the inherited task ID.

    Table 6 EndPoint2 field description

    Name

    Type

    Description

    az_code

    String

    Indicates the AZ code.

    db_name

    String

    Indicates 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: !<>&'"\

    The name of the database to be restored refers to the name of the database contained in the backup file, meaning that you can select one or more databases to be restored as required.

    db_password

    String

    Indicates the database password.

    db_port

    Integer

    Indicates the database port.

    The value is an integer ranging from 1 to 65535.

    db_type

    String

    Indicates the database type.

    db_user

    String

    Indicates the database user.

    inst_id

    String

    Indicates the RDS DB instance ID. This parameter is mandatory when the database is an RDS DB instance.

    inst_name

    String

    Indicates the name of the RDS DB instance.

    ip

    String

    Indicates the database IP address. This parameter is mandatory when you modify the task information interface and the source database is not an RDS instance.

    IP address range: 0.0.0.0-255.255.255.255

    kerberos

    KerberosVO

    Indicates the information required for Kerberos authentication.

    mongo_ha_mode

    String

    Indicates the mongoha mode.

    project_id

    String

    Indicates the project ID of the RDS DB instance. Set this parameter when the database is an RDS DB instance in the DR scenario.

    region

    String

    Indicates the region where the RDS DB instance is located. This parameter is mandatory when the database is an RDS DB instance.

    safe_mode

    Integer

    Indicates whether Kerberos authentication is enabled for MRS.

    security_group_id

    String

    Indicates the ID of the security group to which the source database belongs.

    ssl_cert_password

    String

    Indicates the SSL certificate password. The certificate file name extension is .p12 and requires a password.

    ssl_cert_check_sum

    String

    Indicates the checksum value of the SSL certificate, which is used for backend verification. This parameter is mandatory for the secure connection to the source database.

    ssl_cert_key

    String

    Indicates the SSL certificate content, which is encrypted using Base64. This parameter is mandatory for secure connection to the source database.

    ssl_cert_name

    String

    Indicates the SSL certificate name. This parameter is mandatory for the secure connection to the source database.

    ssl_link

    Boolean

    Indicates whether the connection is an SSL connection.

    subnet_id

    String

    Indicates the ID of the subnet where the source database is located. This parameter is mandatory when you modify the task information and the source database is in a VPC and is not an RDS DB instance.

    topic

    String

    Indicates the Kafka topic.

    vpc_id

    String

    Indicates the ID of the VPC where the source database is located. This parameter is mandatory when you modify the task information and the source database is in a VPC and is not an RDS DB instance.

    Table 7 InstInfoV3 field description

    Name

    Type

    Description

    inst_type

    String

    Indicates the DB instance type.

    Valid values: common, high, and ultrahigh.

    engine_type

    String

    Indicates the engine type.

    volume_size

    Long

    Indicates the disk size of the replication instance.

    public_ip

    String

    Indicates the EIP of the replication instance.

    ip

    String

    Indicates the private IP address of the replication instance.

    ipv6

    String

    Indicates the private IPv6 address of the replication instance.

    status

    String

    Indicates the status of the replication instance.

    Valid values: ACTIVE and DELETED.

    start_time

    String

    Indicates the scheduled start time of the replication instance task.

    Table 8 SpeedLimit field description

    Name

    Type

    Description

    begin

    String

    Start

    end

    String

    End

    speed

    String

    Speed

    isUtc

    Boolean

    Indicates whether UTC is used.

    Table 9 DefaultRootDbV3 field description

    Name

    Type

    Description

    db_name

    String

    Indicates the database name.

    db_encoding

    String

    Indicates the database encoding format.

  • Response example
    {
    "jobs": [
    {
    "id": "9a470239-2308-4bb5-a6bc-1040402fjb21",
    "name": "DRS-4963-zltest",
    "status": "INCRE_TRANSFER_STARTED",
    "description": "Source database IP address or domain name: 192.168.6.178\nDestination instance name: rds-zhangle-mysql-target",
    "task_type": "FULL_INCR_TRANS",
    "source_endpoint": {
    "ip": "192.168.6.178",
    "db_type": "mysql",
    "db_port": 3306,
    "ssl_link": false,
    "project_id": "054ba152d480d55b2f5dc0069e7ddef0",
    "db_user": "root"
    },
    "target_endpoint": {
    "ip": "192.168.6.43",
    "region": "cn-xianhz-1",
    "db_type": "mysql",
    "db_port": 3306,
    "ssl_link": false,
    "inst_id": "bdf5f129b0f546e7b7179d2c61524696in01",
    "project_id": "054ba152d480d55b2f5dc0069e7ddef0",
    "inst_name": "rds-zhangle-mysql-target",
    "db_user": "root",
    "vpc_id": "65f0391c-0582-44a6-aa50-248f97ed82e1",
    "subnet_id": "3f94e724-e99f-4477-8828-9fef481cbdd6"
    },
    "inst_info": {
    "ip": "192.168.6.216",
    "ipv6": "2001:db8:a583:46:3e7:3884:e9fa:5662",
    "inst_type": "high",
    "engine_type": "mysql",
    "volume_size": 100,
    "public_ip": "10.154.218.127",
    "start_time": "0"
    },
    "actual_start_time": "1597977829563",
    "full_transfer_complete_time": "1597978229586",
    "update_time": "1597978233127",
    "job_direction": "up",
    "db_use_type": "sync",
    "need_restart": false,
    "conflict_policy": "ignore",
    "filter_ddl_policy": "drop_database",
    "schema_type": "Tungsten",
    "object_switch": true,
    "sync_database": false,
    "az_code": "az2xahz",
    "vpc_id": "65f0391c-0582-44a6-aa50-248f97ed82e1",
    "subnet_id": "3f94e724-e99f-4477-8828-9fef481cbdd6",
    "security_group_id": "652cbe2d-d487-407e-b666-d01948b33879",
    "issue_coupon": false,
    "support_ip_v6": false
    }
    ],
    "count": 1
    }

Abnormal Response

For details, see Abnormal Request Results.