Help Center/ Host Security Service/ API Reference/ API Description/ Asset Management/ Querying the List of Servers with a Specified Website
Updated on 2026-04-03 GMT+08:00

Querying the List of Servers with a Specified Website

Function

This API is used to query the list of servers with a specified website.

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}/asset/host/web-site

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.

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-200

Default Value

10

category

Yes

String

Definition

Asset Type

Constraints

N/A

Range

  • host: server asset

  • container: container asset

Default Value

host

domain

Yes

String

Definition

Domain name.

Constraints

N/A

Range

Length: 1 to 256 characters

Default Value

N/A

host_name

No

String

Definition

Server name.

Constraints

N/A

Range

It can contain 0 to 64 characters.

Default Value

N/A

host_ip

No

String

Definition

Server IP address.

Constraints

N/A

Range

It can contain 0 to 64 characters.

Default Value

N/A

part_match

No

Boolean

Definition

Whether fuzzy match is used. The default value is false.

Constraints

N/A

Range

  • true: fuzzy match

  • false: exact match

Default Value

false

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.

Range

Minimum value: 0; maximum value: 10000

data_list

Array of WebSiteHostInfo objects

Definition

Server list.

Range

Minimum value: 0; maximum value: 10,000

Table 5 WebSiteHostInfo

Parameter

Type

Description

agent_id

String

agent_id

host_id

String

Host ID.

host_name

String

Server name

host_ip

String

Server IP address

domain

String

Domain Name

app_name

String

App name

path

String

Path

port

Integer

Port

bind_addr

String

IP Address to Be Bound

url_path

String

URL path

uid

Integer

User ID

gid

Integer

User group ID.

mode

String

File Permissions

pid

Integer

Process ID.

proc_path

String

Process path

is_https

Boolean

Whether HTTPS is used

cert_issuer

String

SSL certificate issuer

cert_user

String

SSL certificate user

cert_issue_time

String

SSL certificate issue time

cert_expired_time

String

SSL Certificate Expiration Time

record_time

Long

Scanned On

container_id

String

Container ID

container_name

String

Container Name

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "total_num" : 1,
  "data_list" : [ {
    "agent_id" : "xxx",
    "host_id" : "xxx",
    "host_name" : "xxx",
    "host_ip" : "xxx",
    "domain" : "xxx",
    "app_name" : "xxx",
    "path" : "xxx",
    "port" : 3123,
    "bind_addr" : "xxx",
    "url_path" : "xxx",
    "uid" : 111,
    "gid" : 111,
    "mode" : "xxx",
    "pid" : 12121,
    "proc_path" : "xxx",
    "is_https" : true,
    "cert_issuer" : "xxx",
    "cert_user" : "xxx",
    "cert_issue_time" : "xxx",
    "cert_expired_time" : "xxx",
    "record_time" : 111,
    "container_id" : "xxx",
    "container_name" : "xxx"
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.