Updated on 2026-01-05 GMT+08:00

Querying a Dumping Task

Function

This API is used to query a dumping task.

This API is out-of-date and may not be maintained in the future. Please use the API described in Querying Smart Connect Tasks.

Call Method

For details, see How to Call an API.

URI

GET /v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

connector_id

Yes

String

Instance dump ID.

For details, see Querying Instance IDs.

task_id

Yes

String

Dumping task ID.

Table 2 Query parameter

Parameter

Mandatory

Type

Description

topic-info

No

String

Whether topic information is contained. The default value is false.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

task_name

String

Name of a dumping task.

destination_type

String

Type of the dumping task.

create_time

Long

Time when the dumping task is created.

status

String

Dumping task status.

topics

String

Topic list or topic regular expression of the dumping task.

obs_destination_descriptor

obs_destination_descriptor object

Description of the dump.

topics_info

Array of topics_info objects

Topic information.

Table 4 obs_destination_descriptor

Parameter

Type

Description

consumer_strategy

String

Message consumption policy:

  • latest: Messages are consumed from the end of the topic.
  • earliest: Messages are consumed from the start of the topic.

The default value is latest.

destination_file_type

String

Dump file format. Only text is supported.

obs_bucket_name

String

Name of the OBS bucket used to store the data.

obs_path

String

OBS path.

partition_format

String

Directory structure of the object file written into OBS. The directory structure is in the format of yyyy/MM/dd/HH/mm (time at which the dumping task was created).

  • yyyy: year.
  • yyyy/MM: year and month.
  • yyyy/MM/dd: year, month, and day.
  • yyyy/MM/dd/HH: year, month, day, and hour.
  • yyyy/MM/dd/HH/mm: year, month, day, hour, and minute. For example, 2017/11/10/14/49 means that the directory structure is 2017 > 11 > 10 > 14 > 49, where 2017 is the outermost folder.
NOTE:

After the data is dumped successfully, the storage directory structure is obs_bucket_path/file_prefix/partition_format. The default time zone is GMT+08:00.

record_delimiter

String

Delimiter for the dump file, which is used to separate the user data that is written into the dump file.

Value range:

  • Comma (,)
  • Semicolon (;)
  • Vertical bar (|)
  • Newline (\n)
  • NULL

Default value: newline (\n).

deliver_time_interval

Integer

No package files will be generated if there is no data within a time segment.

Value range: 30-900. Default value: 300. Unit: second.

NOTE:

This parameter is mandatory if streaming data is dumped to OBS.

obs_part_size

Long

Size (in bytes) of each file to be uploaded.

Default value: 5242880.

Table 5 topics_info

Parameter

Type

Description

topic

String

Topic name.

partitions

Array of partitions objects

Partition list.

Table 6 partitions

Parameter

Type

Description

partition_id

String

Partition ID.

status

String

Running status.

last_transfer_offset

String

Dumped message offset.

log_end_offset

String

Message offset.

lag

String

Number of stacked messages.

Example Request

Querying specified dumping task details

GET https://{endpoint}/v2/{project_id}/connectors/{connector_id}/sink-tasks/{task_id}?topic-info=true

Example Response

Status code: 200

Successfully querying a dumping task

{
  "task_name" : "obsTransfer-56997523",
  "destination_type" : "OBS",
  "create_time" : 1628126621283,
  "status" : "RUNNING",
  "topics" : "topic-sdk-no-delete",
  "obs_destination_descriptor" : {
    "consumer_strategy" : "earliest",
    "destination_file_type" : "TEXT",
    "obs_bucket_name" : "testobs",
    "obs_path" : "obsTransfer-56997523",
    "partition_format" : "yyyy/MM/dd/HH/mm",
    "record_delimiter" : "",
    "deliver_time_interval" : 300,
    "obs_part_size" : 5242880
  },
  "topics_info" : [ {
    "topic" : "topic-sdk-no-delete",
    "partitions" : [ {
      "partition_id" : "2",
      "status" : "RUNNING",
      "last_transfer_offset" : "3",
      "log_end_offset" : "3",
      "lag" : "0"
    }, {
      "partition_id" : "1",
      "status" : "RUNNING",
      "last_transfer_offset" : "3",
      "log_end_offset" : "3",
      "lag" : "0"
    }, {
      "partition_id" : "0",
      "status" : "RUNNING",
      "last_transfer_offset" : "3",
      "log_end_offset" : "3",
      "lag" : "0"
    } ]
  } ]
}

Status Code

Status Code

Description

200

The dumping task is queried successfully.

Error Codes

See Error Codes.