Help Center/ Host Security Service/ API Reference/ API Description/ Protection configuration/ Querying the Policy Group List, Only CN Southwest-Guiyang1 Is Supported
Updated on 2026-09-24 GMT+08:00

Querying the Policy Group List, Only CN Southwest-Guiyang1 Is Supported

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which can be obtained from My Credentials.

Constraints

Mandatory

Range

The value can contain 1 to 256 characters.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

group_id

No

String

Definition

Policy group ID.

Constraints

N/A

Range

The value can contain 1 to 20 characters.

Default Value

N/A

group_name

No

String

Definition

Policy group name.

Constraints

N/A

Range

The value can contain 1 to 128 characters.

Default Value

N/A

protection_object

No

String

Definition

Protected Object

Constraints

N/A

Range

The value can contain 1 to 128 characters.

Default Value

N/A

object_type

No

Integer

Definition

Object type

Constraints

N/A

Range

  • 0: cloud service

  • 1: third-party

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

Default Value

10

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 AiPolicyGroupInfo objects

Definition

AI policy group list.

Range

N/A

Table 5 AiPolicyGroupInfo

Parameter

Type

Description

group_id

String

Definition

Policy group ID.

Range

The value can contain 1 to 20 characters.

group_name

String

Definition

Policy group name.

Range

The value can contain 1 to 128 characters.

group_type

Integer

Definition

Policy group ID.

Range

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

project_id

String

Project ID

protection_object

String

Definition

Protection object

Range

The value can contain 1 to 128 characters.

object_type

Integer

Definition

Protected object type.

Range

  • 0: cloud service

  • 1: third-party

object_num

Integer

Definition

Protected object count

Range

The value ranges from 0 to 100,000.

is_default

Boolean

Definition

Whether the policy is the default policy.

Range

  • false: no

  • true: yes

is_exclusive

Boolean

Definition

Whether the policy is the default policy.

Range

  • false: no

  • true: yes

enabled

Boolean

Definition

Whether to enable

Range

  • false: no

  • true: yes

detail_is_used

Boolean

Definition

Whether to enable

Range

  • false: no

  • true: yes

description

String

Definition

Description

Range

The value can contain 0 to 256 characters.

create_time

Integer

Definition

Creation time.

Range

The value range is 0 to 9,223,372,036,854,775,807.

update_time

Integer

Definition

Creation time.

Range

The value range is 0 to 9,223,372,036,854,775,807.

policy_list

Array of AiPolicyList objects

Definition

Policy list.

Range

N/A

agent_id_list

Array of strings

Definition

AI Agents

Range

N/A

Table 6 AiPolicyList

Parameter

Type

Description

policy_id

String

Definition

Policy ID.

Range

The value can contain 1 to 20 characters.

policy_name

String

Definition

Policy Name

Range

  • 0: Intention-behavior consistency check

  • 1: Command execution control

  • 2: File access control

  • 3: Sensitive information check

  • 4: Role constraint

enabled

Boolean

Definition

Whether to enable

Range

  • false: no

  • true: yes

Example Requests

Query the policy group list.

GET https://{endpoint}/v5/{project_id}/ai/policy/groups

Example Responses

Status code: 200

{
  "total_num" : 3,
  "data_list" : [ {
    "group_id" : "2058116443399700480",
    "group_name" : "xxxx",
    "project_id" : "84b5266c14ae489fa6549827f032dc62",
    "protection_object" : "OfficeClaw",
    "object_type" : 0,
    "object_num" : 1,
    "is_default" : true,
    "enabled" : true,
    "description" : "1111",
    "create_time" : 1778874953990,
    "update_time" : 1779604792737,
    "policy_list" : null
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.