Updated on 2025-05-21 GMT+08:00

Querying Smart Connect Task Details

Function

This API is used to query Smart Connect task details.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{project_id}/instances/{instance_id}/connector/tasks/{task_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID.

task_id

Yes

String

Smart Connect task ID.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

task_name

String

Smart Connect task name.

topics

String

Topic of a Smart Connect task.

topics_regex

String

Regular expression of the topic of a Smart Connect task.

source_type

String

Source type of a Smart Connect task.

source_task

SmartConnectTaskRespSourceConfig object

Source configuration of a Smart Connect task.

sink_type

String

Target type of a Smart Connect task.

sink_task

SmartConnectTaskRespSinkConfig object

Target type of a Smart Connect task.

id

String

ID of a Smart Connect task.

status

String

Smart Connect task status.

create_time

Long

Time when the Smart Connect task was created.

Table 3 SmartConnectTaskRespSourceConfig

Parameter

Type

Description

current_cluster_name

String

Current Kafka instance name. (Displayed only when the source type is Kafka.)

cluster_name

String

Target Kafka instance name. (Displayed only when the source type is Kafka.)

user_name

String

Username of the target Kafka instance. (Displayed only when the source type is Kafka.)

sasl_mechanism

String

Target Kafka authentication mode. (Displayed only when the source type is Kafka.)

instance_id

String

Target Kafka instance ID. (Displayed only when the source type is Kafka.)

bootstrap_servers

String

Target Kafka instance address. (Displayed only when the source type is Kafka.)

security_protocol

String

Target Kafka authentication. (Displayed only when the source type is Kafka.)

direction

String

Sync direction. (Displayed only when the source type is Kafka.)

sync_consumer_offsets_enabled

Boolean

Indicates whether to sync the consumption progress. (Displayed only when the source type is Kafka.)

replication_factor

Integer

Number of replicas. (Displayed only when the source type is Kafka.)

task_num

Integer

Number of tasks. (Displayed only when the source type is Kafka.)

rename_topic_enabled

Boolean

Indicates whether to rename a topic. (Displayed only when the source type is Kafka.)

provenance_header_enabled

Boolean

Indicates whether to add the source header. (Displayed only when the source type is Kafka.)

consumer_strategy

String

Start offset. latest: Obtain the latest data; earliest: Obtain the earliest data. (Displayed only when the source type is Kafka.)

compression_type

String

Compression algorithm. (Displayed only when the source type is Kafka.)

topics_mapping

String

Topic mapping. (Displayed only when the source type is Kafka.)

Table 4 SmartConnectTaskRespSinkConfig

Parameter

Type

Description

consumer_strategy

String

Start offset. latest: Obtain the latest data; earliest: Obtain the earliest data. (Displayed only when the target type is OBS.)

destination_file_type

String

Dump file format. Only TEXT is supported. (Displayed only when the target type is OBS.)

deliver_time_interval

Integer

Dumping period (s). (Displayed only when the target type is OBS.)

obs_bucket_name

String

Dumping address. (Displayed only when the target type is OBS.)

obs_path

String

Dump directory. (Displayed only when the target type is OBS.)

partition_format

String

Time directory format. (Displayed only when the target type is OBS.)

record_delimiter

String

Line break. (Displayed only when the target type is OBS.)

store_keys

Boolean

Storage key. (Displayed only when the target type is OBS.)

obs_part_size

Integer

Size (in bytes) of each file to be uploaded. The default value is 5242880. (Displayed only when the target type is OBS.)

flush_size

Integer

flush_size. (Displayed only when the target type is OBS.)

timezone

String

Time zone. (Displayed only when the target type is OBS.)

schema_generator_class

String

schema_generator class. The default value is io.confluent.connect.storage.hive.schema.DefaultSchemaGenerator. (Displayed only when the target type is OBS.)

partitioner_class

String

partitioner class. The default value is io.confluent.connect.storage.partitioner.TimeBasedPartitioner. (Displayed only when the target type is OBS.)

value_converter

String

value_converter. The default value is org.apache.kafka.connect.converters.ByteArrayConverter. (Displayed only when the target type is OBS.)

key_converter

String

key_converter. The default value is org.apache.kafka.connect.converters.ByteArrayConverter. (Displayed only when the target type is OBS.)

kv_delimiter

String

kv_delimiter. The default value is :. (Displayed only when the target type is OBS.)

Example Requests

None

Example Responses

Status code: 200

Successful.

{
  "task_name" : "smart-connect-121248117",
  "topics" : "topic-1643449744",
  "source_task" : {
    "current_cluster_name" : "A",
    "cluster_name" : "B",
    "direction" : "pull",
    "bootstrap_servers" : "192.168.45.58:9092,192.168.44.1:9092,192.168.41.230:9092,192.168.43.112:9092",
    "instance_id" : "59f6d088-****-****-****-********",
    "consumer_strategy" : "earliest",
    "sync_consumer_offsets_enabled" : false,
    "rename_topic_enabled" : false,
    "provenance_header_enabled" : false,
    "security_protocol" : "PLAINTEXT",
    "sasl_mechanism" : "PLAIN",
    "user_name" : "",
    "topics_mapping" : "",
    "compression_type" : "none",
    "task_num" : 2,
    "replication_factor" : 3
  },
  "source_type" : "KAFKA_REPLICATOR_SOURCE",
  "sink_task" : null,
  "sink_type" : "NONE",
  "id" : "194917d0-****-****-****-********",
  "status" : "RUNNING",
  "create_time" : 1708427753133
}

Status Codes

Status Code

Description

200

Successful.

Error Codes

See Error Codes.