Help Center/ Host Security Service/ API Reference/ API Description/ Container Images/ Querying Details About an Image Whitelist
Updated on 2026-04-03 GMT+08:00

Querying Details About an Image Whitelist

Function

This API is used to query details about the image whitelist. The list of images associated with the whitelist needs to be queried by page.

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}/image/whitelists/{id}

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

id

Yes

String

Definition

Whitelist ID

Constraints

N/A

Range

Length: 1 to 64 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

global_image_type

Yes

String

Definition

Image type.

Constraints

N/A

Range

  • local: local image

  • registry: repository image

Default Value

N/A

type

Yes

String

Definition

Whitelist type.

Constraints

N/A

Range

  • vulnerability: vulnerability whitelist

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

id

String

Definition

Whitelist ID

Range

Length: 0 to 64 characters

vul_id

String

Definition

Vulnerability ID (returned only when the vulnerability whitelist is queried)

Range

Length: 0 to 256 characters

vul_name

String

Definition

Vulnerability name (returned only when the vulnerability whitelist is queried)

Range

Length: 0 to 256 characters

vul_type

String

Definition

Vulnerability type (returned only when the vulnerability whitelist is queried)

Range

  • linux_vul: Linux vulnerability.

  • app_vul: application vulnerability.

cves

Array of cves objects

Definition

CVE list corresponding to the vulnerability (returned only when the vulnerability whitelist is queried)

Range

Minimum value: 0; maximum value: 1000

rule_type

String

Whitelist rule type. The options are as follows:

-all_images: The whitelist applies to all images.

-specific_image_types: The whitelist applies to specified image types (only to specified repository image types).

-specific_images: The whitelist applies to specified images.

query_info

query_info object

Specifies the image type when the whitelist rule is specific_image_types.

image_info

Array of image_info objects

Specifies the image list when the whitelist rule is specific_images. Data is returned only when details about the image whitelist are queried.

description

String

Definition

Description of a whitelist

Range

Length: 0 to 1024 characters

Table 5 cves

Parameter

Type

Description

cve_id

String

Definition

CVE ID

Range

Length: 0 to 256 characters

cvss

Float

Definition

CVE Score

Range

Value range: 0 to 10

Table 6 query_info

Parameter

Type

Description

image_type

String

Definition

Image type. Use commas (,) to separate multiple types.

Range

  • private_image: SWR private image repository.

  • shared_image: shared image repository of SWR.

  • instance_image: SWR enterprise repository.

  • harbor: Harbor repository.

  • jfrog: JFrog repository.

Table 7 image_info

Parameter

Type

Description

id

Long

Definition

Repository image ID

Range

Value range: 1 to 9223372036854775807

image_id

String

Definition

Local image ID.

Range

Length: 1 to 64 characters

image_name

String

Definition

Image name.

Range

Length: 1 to 256 characters

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "vul_id" : "CESA-2011:1777",
  "vul_name" : "EulerOS-SA-2020-1102",
  "vul_type" : "linux_vul",
  "cves" : [ {
    "cve_id" : "KYSA-202201-0009",
    "cvss" : 7.9
  } ],
  "rule_type" : "specific_images",
  "query_info" : null,
  "image_info" : [ {
    "id" : 9223372036854776000,
    "image_name" : "image_name"
  } ],
  "description" : "some description"
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.