Help Center/ Host Security Service/ API Reference/ API Description/ Web Tamper Protection/ Exporting the List of Protected WTP Directories
Updated on 2026-04-03 GMT+08:00

Exporting the List of Protected WTP Directories

Function

This API is used to export the list of protected WTP directories.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v5/{project_id}/webtamper/host/export

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which is used to specify the project that an asset belongs to. After the project ID is configured, you can query assets in the project using the project ID. For details about how to obtain it, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 1 to 256 characters.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Definition

Enterprise project ID, which is used to filter assets in different enterprise projects. For details, see Obtaining an Enterprise Project ID.

To query assets in all enterprise projects, set this parameter to all_granted_eps.

Constraints

You need to set this parameter only after the enterprise project function is enabled.

Range

The value can contain 1 to 256 characters.

Default Value

0: default enterprise project.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token, which contains user identity and permissions. The token can be used for identity authentication when an API is called. For details about how to obtain the token, see Obtaining a User Token.

Constraints

N/A

Range

The value can contain 1 to 32,768 characters.

Default Value

N/A

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

host_id

No

String

Definition

Unique ID of a server (host).

Range

The value can contain 1 to 64 characters.

host_id_list

No

Array of strings

Definition

Server ID list.

Range

N/A

host_name

No

String

Definition

Server name.

Range

The value can contain 1 to 256 characters.

public_ip

No

String

Definition

Elastic IP Address (EIP)

Range

The value is a string of 1 to 256 characters and can be an IPv4 or IPv6 address. (An IPv4 address can contain 7 to 15 characters. An IPv6 address can contain 15 to 39 characters.)

private_ip

No

String

Definition

Server private IP address.

Range

The value can contain 1 to 128 characters.

agent_id

No

String

Definition

Agent ID. (This parameter has been discarded. Use host_id instead.)

Constraints

N/A

Range

Length: 1 to 64 characters

Default Value

N/A

os_type

No

String

Definition

OS Type

Range

  • Linux

  • Windows

asset_value

No

String

Definition

Asset importance.

Range

  • important

  • common

  • test

group_name

No

String

Definition

Server group name.

Range

The value can contain 0 to 256 characters.

protect_status

No

String

Protection status. (This parameter has been discarded. Use wtp_status instead.)

agent_status

No

String

Definition

Agent status.

Constraints

N/A

Range

  • not_installed

  • online

  • offline

Default Value

N/A

rasp_protect_status

No

String

Dynamic Web Tamper Protection Status

  • opened

  • closed

wtp_status

No

String

Definition

WTP status.

Range

  • opening: The function is being enabled.

  • opened: The protection is in progress.

  • open_failed: Protection failed.

  • partial_protection: Partially protected.

  • protection_interruption: Protection interrupted.

offset

No

Integer

Offset. (This parameter has been discarded. Use export_size instead.)

limit

No

Integer

Number of records displayed on each page. (This parameter has been discarded. Use export_size instead.)

export_headers

Yes

Array<Array<String>>

Definition

Export data table header details.

Constraints

The table header information must be in the following format: [[Field1,ColumnHeader1],[Field2,ColumnHeader2],[Field3,ColumnHeader3]]

Range

You can select some or all of the following values to form the table header information:

  • host_name: server name

  • host_id: server ID

  • public_ip: EIP

  • private_ip: private IP address

  • charging_mode: billing mode

  • agent_status: agent status

  • protect_status: protection status

  • protect_dir_num: number of protected directories

  • rasp_protect_status: dynamic WTP status

  • anti_tampering_times: attacks blocked by static WTP (last seven days)

  • detect_tampering_times: attacks blocked by dynamic WTP (last seven days)

  • protect_dir: protected directory

  • exclude_child_dir: excluded subdirectory

  • exclude_file_list: excluded file path list

  • local_backup_dir: local backup path

  • exclude_file_type: excluded file type

  • dir_protect_status: protected directory status

  • error: error information

Default Value

N/A

export_size

Yes

Integer

Definition

Maximum number of exported data records.

Constraints

N/A

Range

Minimum value: 1; maximum value: 200000

Default Value

N/A

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

task_id

String

Definition

ID of the export task.

Range

Length: 0 to 128 characters

Example Requests

Export the list of directories protected by WTP.

POST https://{endpoint}/v5/{project_id}/webtamper/host/export

{
  "export_size" : 10,
  "export_headers" : [ [ "host_name", "Server name" ], [ "host_id", "Server ID." ] ]
}

Example Responses

Status code: 200

Request succeeded.

{
  "task_id" : "9e8***4-d26b-426d-a2be-765930242984"
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.