Queries the information of a data migration task.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see Common request headers.

Request syntax

GET /openapi/instances/{InstanceId}/data-task HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
InstanceId String Path Yes es-cn-oew1oxiro000f****

The ID of the instance.

Response parameters

Parameter Type Example Description
RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1D***

The request ID.

Result Array of Result

The response parameters.

createTime String 2020-07-30 06:32:18

The time when the command task was created.

taskId String et_cn_mfv1233r47272****

The task ID.

status String SUCCESS

The status of the batch task.

sinkCluster Object

The information about the destination cluster.

index String product_info

The target index.

type String _doc

The type of the index.

endpoint String http://192.168.xx.xx:4101

The public endpoint of the destination cluster.

vpcId String vpc-2ze55voww95g82gak****

The ID of the VPC to which the cluster belongs.

vpcInstancePort String 9200

The access port number of the cluster.

vpcInstanceId String es-cn-09k1rnu3g0002****-worker

The ID of the current cluster or SLB(Server Load Balancer) instance.

dataSourceType String 1

The type of the destination cluster. The default value is Elasticsearch.

sourceCluster Object

The information about the source cluster.

index String product_info

The index whose data you want to migrate.

settings String {\n \"index\": {\n \"replication\": {\n}.....}}

The settings of the cluster.

mapping String {\"_doc\":{\"properties\":{\"user\":{\"properties\":{\"last\":{\"type\":\"text\",...}}}}}}

The mapping configuration of the cluster.

type String _doc

The type of the index.

routing String _id

The index routing field. By default, the primary key field is used.

dataSourceType String elasticsearch

The type of the source cluster. The default value is Elasticsearch.

Examples

Sample requests

GET /openapi/instances/es-cn-oew1oxiro000f****/data-task HTTP/1.1
Common request header

Sample success response

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Result" : [ {
    "taskId" : "et_cn_mfv1233r47272****",
    "sourceCluster" : {
      "dataSourceType" : "elasticsearch",
      "endpoint" : "http://192.168.xx.xx:4101",
      "vpcInstancePort" : 9200,
      "vpcId" : "vpc-2ze55voww95g82gak****",
      "vpcInstanceId" : "es-cn-09k1rnu3g0002****-worker",
      "index" : "product_info",
      "type" : "products"
    },
    "sinkCluster" : {
      "dataSourceType" : "elasticsearch",
      "index" : "product_info01",
      "type" : "_doc",
      "settings" : "{\n  \"index\": {\n    \"replication\": {\n}.....}}",
      "mapping" : "{\"_doc\":{\"properties\":{\"user\":{\"properties\":{\"last\":{\"type\":\"text\",...}}}}}}"
    },
    "status" : "SUCCESS",
    "createTime" : "2020-08-03 08:36:19"
  }, {
    "taskId" : "et_cn_vb9g57i4h4eyp****",
    "sourceCluster" : {
      "dataSourceType" : "elasticsearch",
      "endpoint" : "http://192.168.xx.xx:4096",
      "vpcInstancePort" : 9200,
      "vpcId" : "vpc-2ze55voww95g82gak****",
      "vpcInstanceId" : "es-cn-oew1oxiro000f****-worker",
      "index" : "my_index",
      "type" : "_doc"
    },
    "sinkCluster" : {
      "dataSourceType" : "elasticsearch",
      "index" : "my_index003",
      "type" : "_doc",
      "settings" : "{\n  \"index\": {\n    \"replication\": {\n}.....}}",
      "mapping" : "{\"_doc\":{\"properties\":{\"user\":{\"properties\":{\"last\":{\"type\":\"text\",...}}}}}}"
    },
    "status" : "SUCCESS",
    "createTime" : "2020-07-30 06:32:18"
  } ],
  "RequestId" : "8FB71A9A-1ACE-40DA-ADC0-2B3DB44F****"
}

Error codes

For a list of error codes, see Service error codes.