Help Center/ Host Security Service/ API Reference/ API Description/ Web Tamper Protection/ Querying List of Containers Associated with Protection Configuration
Updated on 2026-04-03 GMT+08:00

Querying List of Containers Associated with Protection Configuration

Function

This API is used to query the list of containers associated with the protection configuration.

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

GET /v5/{project_id}/webtamper/protection-containers

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 contains 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.

protection_config_id

Yes

String

Definition

Protection configuration ID.

Constraints

N/A

Range

The value can contain 1 to 64 characters.

Default Value

N/A

offset

No

Integer

Definition

Offset, which specifies the start position of the record to be returned.

Constraints

N/A

Range

The value range is 0 to 2,000,000.

Default Value

The default value is 0.

limit

No

Integer

Definition

Number of records displayed on each page.

Constraints

N/A

Range

Value range: 10 to 200

Default Value

10

host_name

No

String

Definition

Server Name

Constraints

N/A

Range

The value can contain 0 to 128 characters.

Default Value

N/A

host_id

No

String

Definition

Server ID.

Constraints

N/A

Range

The value can contain 0 to 128 characters.

Default Value

N/A

host_private_ip

No

String

Definition

Server private IP address

Constraints

N/A

Range

The value can contain 0 to 128 characters.

Default Value

N/A

container_name

No

String

Definition

Container name.

Constraints

N/A

Range

The value can contain 0 to 128 characters.

Default Value

N/A

container_id

No

String

Definition

Affected container ID

Constraints

N/A

Range

The value can contain 0 to 256 characters.

Default Value

N/A

status

No

String

Definition

Protection status

Constraints

N/A

Range

  • protected: protected

  • partial_protected: partially protected

  • protect_failed: protection failed

Default Value

N/A

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

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_num

Integer

Definition

Total number of containers associated with the protection configuration.

Range

The value range is 0 to 2,147,483,647.

data_list

Array of WebTamperProtectionContainerResponseInfo objects

Definition

List of containers associated with the protection configuration.

Range

The value can contain 0 to 200 WebTamperProtectionContainerResponseInfo objects.

Table 5 WebTamperProtectionContainerResponseInfo

Parameter

Type

Description

status

String

description: |

Definition

Protection status.

Range

  • protected: protected

  • partial_protected: partially protected

  • protect_failed: protection failed

container_id

String

Definition

Container ID

Range

The value can contain 1 to 256 characters.

container_name

String

Definition

Container name.

Range

The value can contain 1 to 256 characters.

image_name

String

Definition

Image

Range

The value can contain 1 to 256 characters.

image_version

String

Definition

Image version

Range

The value can contain 1 to 256 characters.

pod_name

String

Definition

Pod name.

Range

The value can contain 1 to 256 characters.

pod_ip

String

Definition

Pod IP address.

Range

The value can contain 1 to 256 characters.

namespace

String

Definition

Namespace.

Range

The value can contain 1 to 256 characters.

all_directory_nums

Integer

Definition

Total number of protected directories.

Range

The value range is 0 to 2,147,483,647.

protected_directory_nums

Integer

Definition

Number of successful protection records.

Range

The value range is 0 to 2,147,483,647.

host_info

WebTamperEventHostInfo object

Definition

Server information corresponding to the web tamper protection event.

Range

N/A

cluster_info

WebTamperEventClusterInfo object

Definition

Cluster information corresponding to the web tamper protection event.

Range

N/A

Table 6 WebTamperEventHostInfo

Parameter

Type

Description

host_id

String

Definition

Host ID.

Range

The value can contain 1 to 128 characters.

host_name

String

Definition

Host Name

Range

The value can contain 1 to 256 characters.

public_ip

String

Definition

Server EIP.

Range

The value can contain 1 to 128 characters.

private_ip

String

Definition

Private IP address of the server.

Range

The value can contain 1 to 128 characters.

asset_value

String

Definition

Server asset importance.

Range

  • important

  • common

  • test

os_type

String

Definition

OS Type

Range

The options are as follows:

  • Linux

  • Windows

os_name

String

Definition

System Name

Range

The value can contain 0 to 128 characters.

host_status

String

Definition

Server Status

Range

The options are as follows:

  • ACTIVE: running

  • SHUTOFF: shut down

  • BUILDING: creating

  • ERROR: faulty

agent_status

String

Definition

Agent Status

Range

The options are as follows:

  • installed

  • not_installed

  • online

  • offline

  • install_failed

  • installing

Table 7 WebTamperEventClusterInfo

Parameter

Type

Description

cluster_id

String

Definition

Cluster ID.

Range

The value can contain 1 to 128 characters.

cluster_name

String

Definition

Cluster name.

Range

The value can contain 1 to 256 characters.

cluster_type

String

Definition

Cluster type.

Range

The value can contain 1 to 128 characters.

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "total_num" : 1,
  "data_list" : [ {
    "container_name" : "aa",
    "container_id" : "",
    "status" : "protected",
    "image_name" : "aa",
    "image_version" : "1.0",
    "pod_name" : "11",
    "pod_ip" : "",
    "namespace" : "",
    "host_info" : {
      "host_name" : "",
      "host_id" : "",
      "private_ip" : "",
      "public_ip" : "",
      "os_type" : "",
      "os_name" : "",
      "agent_status" : "",
      "host_status" : ""
    },
    "cluster_info" : {
      "cluster_name" : "",
      "cluster_id" : "",
      "cluster_type" : ""
    }
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.