Updated on 2025-07-01 GMT+08:00

Querying Cluster Scanning Statistics

Function

This API is used to query cluster scanning statistics.

Calling Method

For details, see Calling APIs.

URI

GET /v5/{project_id}/container/cluster/statistics

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Parameter description:

Project ID, which can be obtained from my credentials

Constraints:

N/A

Options:

The value contains 1 to 256 characters.

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Parameter description:

Specifies the ID of the enterprise project that the server belongs to.

Enterprise project ID. The value 0 indicates the default enterprise project. To query servers in all enterprise projects, set this parameter to all_granted_eps. If you have only the permission on an enterprise project, you need to transfer the enterprise project ID to query the server in the enterprise project. Otherwise, an error is reported due to insufficient permission.

Constraints:

An enterprise project can be configured only after the enterprise project function is enabled.

Options:

The value contains 1 to 256 characters.

Default value:

0

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

risk_cluster_num

Integer

Clusters with Risks

app_vul_cluster_num

Integer

Clusters with Vulnerable Applications

unscan_cluster_num

Integer

Unscanned Clusters

all_cluster_num

Integer

Total Clusters

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "risk_cluster_num" : 5,
  "app_vul_cluster_num" : 1,
  "unscan_cluster_num" : 10,
  "all_cluster_num" : 20
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.