Help Center/ Log Tank Service/ API Reference/ APIs/ Log Transfer/ Deleting a Log Transfer Task
Updated on 2025-08-21 GMT+08:00

Deleting a Log Transfer Task

Function

This API is used to delete a log transfer task, such as an OBS, DIS, or DMS transfer task.

Calling Method

For details, see Calling APIs.

URI

DELETE /v2/{project_id}/transfers

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. It can be obtained by calling an API or from the console. For details, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

log_transfer_id

Yes

String

Definition

Log transfer task ID. You can obtain it by calling either of the following APIs:

  1. API for querying a log transfer task

  2. API for creating a log transfer task

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token obtained from IAM. For details about how to obtain it, see Obtaining a User Token.

Constraints

N/A

Range

N/A

Default Value

N/A

Content-Type

Yes

String

Definition

Message body format. Set this parameter to application/json;charset=utf8.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

log_group_id

String

Definition

ID of the created log group.

Range

N/A

log_group_name

String

Definition

Name of the created log group.

Range

N/A

log_streams

Array of log_streams objects

Definition

Details about log streams in the log group.

log_transfer_id

String

Definition

ID of the created log transfer task.

Range

N/A

log_transfer_info

log_transfer_info_RespBody object

Definition

Log transfer information.

Table 5 log_streams

Parameter

Type

Description

log_stream_id

String

Definition

Log stream ID.

Range

N/A

log_stream_name

String

Definition

Log stream name.

Range

N/A

Table 6 log_transfer_info_RespBody

Parameter

Type

Description

log_agency_transfer

log_agency_transfer object

Definition

Information about the transfer agency.

If the log source of transfer is another account, logs generated by the delegator account is transferred. Ensure that the delegator has created an agency for log transfer delegation in IAM.

log_create_time

Integer

Definition

Time when the log transfer task was created.

Range

0 to 2147483647

log_storage_format

String

Definition

Log transfer format. The value can be RAW (raw logs) or JSON.

The available format options depend on the selected transfer destination. When the transfer destination is OBS or DIS, JSON and RAM are supported. When the transfer destination is DMS, only RAW is supported.

Range

  • RAW

  • JSON

log_transfer_detail

TransferDetail object

Definition

Log transfer information.

log_transfer_mode

String

Definition

Log transfer mode. The value can be cycle (periodical transfer) and realTime (real-time transfer).

The available mode options depend on the selected transfer destination. If the transfer destination is OBS, the transfer mode can be cycle. If the transfer destination is DIS or DMS, the transfer mode can be realTime.

Range

  • cycle

  • realTime

log_transfer_status

String

Definition

Log transfer status.

Range

  • ENABLE: Log transfer is enabled.

  • DISABLE: Log transfer is disabled.

  • EXCEPTION: Log transfer is abnormal.

log_transfer_type

String

Definition

Log transfer type.

Range

  • OBS: Logs are transferred to OBS.

  • DIS: Logs are transferred to DIS.

  • DMS: Logs are transferred to DMS.

Table 7 log_agency_transfer

Parameter

Type

Description

agency_domain_id

String

Definition

Account ID of the delegator.

Range

N/A

agency_domain_name

String

Definition

Account name of the delegator.

Range

N/A

agency_name

String

Definition

Name of the agency created by the delegator.

Range

N/A

agency_project_id

String

Definition

Project ID of the delegator.

Range

N/A

be_agency_domain_id

String

Definition

Account ID of the delegated party (ID of the account that created the log transfer task).

Range

N/A

be_agency_project_id

String

Definition

Project ID of the delegated party (ID of the project for which the transfer task is created).

Range

N/A

Table 8 TransferDetail

Parameter

Type

Description

obs_period

Integer

Definition

Time for transferring logs to OBS. This parameter is returned when the transfer destination is OBS.

Range

1, 2, 3, 5, 6, 2, 30

obs_period_unit

String

Definition

Time unit for transferring data to OBS. This parameter is returned when the transfer destination is OBS.

Range

  • min

  • hour

obs_bucket_name

String

Definition

Name of the OBS bucket to which logs are transferred. This parameter is returned when the transfer destination is OBS.

Range

N/A

obs_encrypted_id

String

Definition

KMS key ID of the OBS bucket to which logs are transferred. This parameter is returned when logs are transferred to an encrypted OBS bucket.

Range

N/A

obs_dir_pre_fix_name

String

Definition

Custom transfer path to which logs are transferred to OBS. This parameter is returned when the transfer destination is OBS. Logs will be transferred to this custom path to separate log files from different log streams.

Range

N/A

obs_prefix_name

String

Definition

File name prefix of the log files transferred to an OBS bucket. This parameter is returned when the transfer destination is OBS.

Range

N/A

obs_time_zone

String

Definition

Time zone for an OBS transfer task. For details, see Time Zone List for OBS Transfer.

Range

N/A

obs_time_zone_id

String

Definition

Time zone ID for an OBS transfer task. For details, see Time Zone List for OBS Transfer.

Range

N/A

dis_id

String

Definition

ID of the DIS transfer channel to which logs are transferred. This parameter is returned when logs are transferred to DIS.

Range

N/A

dis_name

String

Definition

Name of the DIS transfer channel to which logs are transferred. This parameter is returned when logs are transferred to DIS.

Range

N/A

kafka_id

String

Definition

Kafka ID for transferring logs to DMS. This parameter is returned when logs are transferred to DMS.

Before creating a DMS transfer task, register your Kafka instance with Kafka ID and Kafka topic first. For details, see Registering a DMS Kafka Instance.

Range

N/A

kafka_topic

String

Definition

Kafka topic for transferring logs to DMS. This parameter is returned when logs are transferred to DMS.

Before creating a DMS transfer task, register your Kafka instance with Kafka ID and Kafka topic first. For details, see Registering a DMS Kafka Instance.

Range

N/A

obs_transfer_path

String

Definition

OBS bucket path, which is the log transfer destination.

Range

N/A

obs_encrypted_enable

Boolean

Definition

Whether OBS bucket encryption is enabled.

Range

  • true

  • false

tags

Array of strings

Definition

Whether filtering by tag fields is enabled.

Range

N/A

Status code: 400

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code. For details, see Error Codes.

Range

N/A

error_msg

String

Definition

Error message.

Range

N/A

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code. For details, see Error Codes.

Range

N/A

error_msg

String

Definition

Error message.

Range

N/A

Example Requests

Delete a log transfer task based on its ID.

DELETE https://{endpoint}/v2/{project_id}/transfers

/v2/{project_id}/transfers?log_transfer_id=cfc43c45-9edc-4a03-8578-0eb00cxxxxxx

Example Responses

Status code: 200

The log transfer task is deleted.

{
  "log_group_id" : "9a7e2183-2d6d-4732-9a9b-e897fd4e49e0",
  "log_group_name" : "lts-group-kafka",
  "log_streams" : [ {
    "log_stream_id" : "839dac89-35af-4db2-ab4a-a7dda0d0d3f8",
    "log_stream_name" : "lts-topic-kafka"
  } ],
  "log_transfer_id" : "ddced522-233a-4181-a5fc-7b458c819afc",
  "log_transfer_info" : {
    "log_create_time" : 1634802241847,
    "log_storage_format" : "JSON",
    "log_agency_transfer" : {
      "agency_domain_id" : "1d26cc8c86a840e28a4f8d0d078xxxxx",
      "agency_domain_name" : "paas_apm_z004xxxxx_xx",
      "agency_name" : "test20210325",
      "agency_project_id" : "2a473356cca5487f8373be891bfxxxxx",
      "be_agency_domain_id" : "1d26cc8c86a840e28a4f8d0d078xxxxx",
      "be_agency_project_id" : "2a473356cca5487f8373be891bfxxxxx"
    },
    "log_transfer_detail" : {
      "obs_period" : 2,
      "obs_prefix_name" : "",
      "obs_period_unit" : "min",
      "obs_transfer_path" : "/0002/LogTanks/xxx/",
      "obs_bucket_name" : "0002",
      "obs_encrypted_enable" : false,
      "obs_dir_pre_fix_name" : "",
      "obs_time_zone" : "UTC+01:00",
      "obs_time_zone_id" : "Africa/Lagos",
      "dis_id" : "xxxxx",
      "dis_name" : "xxxxxx",
      "kafka_id" : "xxxxxx",
      "kafka_topic" : "xxxxx"
    },
    "log_transfer_mode" : "cycle",
    "log_transfer_status" : "ENABLE",
    "log_transfer_type" : "OBS"
  }
}

Status code: 400

Invalid request. Modify the request based on the description in error_msg before a retry.

{
  "error_code" : "LTS.0405",
  "error_msg" : "The log transfer does not existed"
}

Status code: 500

The server has received the request but encountered an internal error.

{
  "error_code" : "LTS.0010",
  "error_msg" : "The system encountered an internal error"
}

Status Codes

Status Code

Description

200

The log transfer task is deleted.

400

Invalid request. Modify the request based on the description in error_msg before a retry.

500

The server has received the request but encountered an internal error.

Error Codes

See Error Codes.