Updated on 2025-12-31 GMT+08:00

Querying Smart Connect Task Details

Function

This API is used to query details about a Smart Connect task.

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

Definition:

Smart Connect task name.

Range:

N/A

topics

String

Definition:

Topic of a Smart Connect task.

Range:

N/A

topics_regex

String

Definition:

Topic regular expression of a Smart Connect task.

Range:

N/A

source_type

String

Definition:

Source type of a Smart Connect task.

Range:

  • NONE: none

  • KAFKA_REPLICATOR_SOURCE: Kafka data replication

source_task

SmartConnectTaskRespSourceConfig object

Definition:

Source configuration of a Smart Connect task.

sink_type

String

Definition:

Target type of a Smart Connect task.

Range:

  • NONE: none

  • OBS_SINK: dump

sink_task

SmartConnectTaskRespSinkConfig object

Definition:

Target configuration of a Smart Connect task.

id

String

Definition:

ID of a Smart Connect task.

Range:

N/A

status

String

Definition

Status of a Smart Connect task.

Range

  • PAUSED

  • RUNNING

  • WAITING

  • RESTARTING

create_time

Long

Definition:

Time when a Smart Connect task was created.

Range:

N/A

Table 3 SmartConnectTaskRespSourceConfig

Parameter

Type

Description

current_cluster_name

String

Definition:

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

Range:

N/A

cluster_name

String

Definition:

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

Range:

N/A

user_name

String

Definition:

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

Range:

N/A

sasl_mechanism

String

Definition:

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

Range:

  • PLAIN

  • SCRAM-SHA-512

instance_id

String

Definition:

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

Range:

N/A

bootstrap_servers

String

Definition:

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

Range:

N/A

security_protocol

String

Definition:

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

Range:

  • PLAINTEXT: SSL is disabled and data is transmitted in plaintext.

  • SASL_SSL: SASL is used for authentication. Data is encrypted with an SSL certificate for high-security transmission.

  • SASL_PLAINTEXT: SASL is used for authentication. Data is transmitted in plaintext for better performance.

direction

String

Definition:

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

Range:

  • pull

  • push

  • two-way

sync_consumer_offsets_enabled

Boolean

Definition:

Whether to synchronize the consumer offset. (Displayed only when the source type is Kafka.)

Range:

  • true: Yes

  • false: No

replication_factor

Integer

Definition:

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

Range:

N/A

task_num

Integer

Definition:

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

Range:

N/A

rename_topic_enabled

Boolean

Definition:

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

Range:

  • true: Yes

  • false: No

provenance_header_enabled

Boolean

Definition:

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

Range:

  • true: Yes

  • false: No

consumer_strategy

String

Definition:

Start offset. (Displayed only when the source type is Kafka.)

Range:

  • latest: obtains the latest data.

  • earliest: obtains the earliest data.

compression_type

String

Definition:

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

Range:

  • none

  • gzip

  • snappy

  • lz4

  • zstd

topics_mapping

String

Definition:

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

Range:

N/A

Table 4 SmartConnectTaskRespSinkConfig

Parameter

Type

Description

consumer_strategy

String

Definition:

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

Range:

  • latest: obtains the latest data.

  • earliest: obtains the earliest data.

destination_file_type

String

Definition

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

Range

TEXT

deliver_time_interval

Integer

Definition:

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

Range:

N/A

obs_bucket_name

String

Definition:

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

Range:

N/A

obs_path

String

Definition:

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

Range:

N/A

partition_format

String

Definition:

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

Range:

N/A

record_delimiter

String

Definition:

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

Range:

N/A

store_keys

Boolean

Definition:

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

Range:

N/A

obs_part_size

Integer

Definition:

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

Range:

N/A

flush_size

Integer

Definition:

Size of flushed data. (Displayed only when the target type is OBS.)

Range:

N/A

timezone

String

Definition:

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

Range:

N/A

schema_generator_class

String

Definition:

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

Range:

N/A

partitioner_class

String

Definition:

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

Range:

N/A

value_converter

String

Definition:

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

Range:

N/A

key_converter

String

Definition:

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

Range:

N/A

kv_delimiter

String

Definition:

Key-value delimiter. The default value is :. (Displayed only when the target type is OBS.)

Range:

N/A

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.