Updated on 2026-04-03 GMT+08:00

Querying the Policy Group List

Function

This API is used to query the policy group list.

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}/policy/groups

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

group_name

No

String

Definition

Policy group name.

Constraints

N/A

Range

The value can contain 1 to 256 characters.

Default Value

N/A

container_mode

No

Boolean

Definition

Whether only the container edition policies are queried.

Constraints

N/A

Range

  • true: Only the container edition policies are queried. Note: When the value of limit is 200, only the container policy group is returned.

  • false: All policies are queried. Note: When the value of limit is 200, only the premium policy group is returned.

Default Value

false

group_id

No

String

Definition

Policy group ID.

Constraints

N/A

Range

The value can contain 1 to 256 characters.

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.

Range

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

data_list

Array of PolicyGroupResponseInfo objects

Definition

Policy group list.

Range

N/A

Table 5 PolicyGroupResponseInfo

Parameter

Type

Description

group_name

String

Definition

Policy group name.

Range

The value can contain 1 to 256 characters.

group_id

String

Definition

Policy group ID.

Range

The value can contain 1 to 256 characters.

description

String

Definition

Policy group description.

Range

The value can contain 0 to 64 characters.

host_num

Integer

Definition

Associated servers.

Range

The value ranges from 0 to 1,000,000.

default_group

Boolean

Definition

Whether a policy group is the default policy group.

Range

  • true: The policy group is the default policy group.

  • false: The policy group is not the default policy group.

deletable

Boolean

Definition

Whether the policy group can be deleted. The policy group can be deleted only if its default_group is false and host_num is 0.

Range

  • true: It can be deleted.

  • false: It cannot be deleted.

support_os

String

Definition

OS

Range

  • Linux

  • Windows

support_version

String

Definition

Supported edition.

Range

  • hss.version.advanced: professional edition

  • hss.version.enterprise: enterprise edition

  • hss.version.premium: premium edition

  • hss.version.wtp: WTP edition

  • hss.version.container.enterprise: container edition

protect_mode

String

Definition

Protection mode.

Range

  • high_detection: sensitive mode

  • equalization: balanced mode

Example Requests

Query the policy group list of the default enterprise project.

GET https://{endpoint}/v5/{project_id}/policy/groups?offset=0&limit=100&enterprise_project_id=0

Example Responses

Status code: 200

Request succeeded.

{
  "data_list" : [ {
    "default_group" : true,
    "deletable" : false,
    "description" : "container policy group for linux",
    "group_id" : "c831f177-226d-4b91-be0f-bcf98d04ef5d",
    "group_name" : "tenant_linux_container_default_policy_group ",
    "host_num" : 0,
    "support_version" : "hss.version.container.enterprise",
    "support_os" : "Linux"
  }, {
    "default_group" : true,
    "deletable" : false,
    "description" : "enterprise policy group for windows",
    "group_id" : "1ff54b90-1b3e-42a9-a1da-9883a83385ce",
    "group_name" : "tenant_windows_enterprise_default_policy_group ",
    "host_num" : 0,
    "support_version" : "hss.version.enterprise",
    "support_os" : "Windows"
  }, {
    "default_group" : true,
    "deletable" : false,
    "description" : "enterprise policy group for linux",
    "group_id" : "1069bcc0-c806-4ccd-a35d-f1f7456805e9",
    "group_name" : "tenant_linux_enterprise_default_policy_group ",
    "host_num" : 1,
    "support_version" : "hss.version.enterprise",
    "support_os" : "Linux"
  }, {
    "default_group" : true,
    "deletable" : false,
    "description" : "premium policy group for windows",
    "group_id" : "11216d24-9e91-4a05-9212-c4c1d646ee79",
    "group_name" : "tenant_windows_premium_default_policy_group ",
    "host_num" : 0,
    "support_version" : "hss.version.premium",
    "support_os" : "Linux"
  }, {
    "default_group" : true,
    "deletable" : false,
    "description" : "premium policy group for linux",
    "group_id" : "e6e1228a-7bb4-424f-a42b-755162234da7",
    "group_name" : "tenant_linux_premium_default_policy_group ",
    "host_num" : 0,
    "support_version" : "hss.version.premium",
    "support_os" : "Windows"
  } ],
  "total_num" : 5
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.