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

Querying the Detection Rule List

Function

This API is used to query the detection rule list, including 14 detection rules. By default, all detection rules are disabled.

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}/rasp/rule

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

Yes

String

Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps.

os_type

No

String

OS type. Its value can be:

  • Linux

  • Windows

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 the user token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_num

Integer

Total

data_list

Array of FeatureRuleInfo objects

Detection feature rules

Table 5 FeatureRuleInfo

Parameter

Type

Description

chk_feature_id

Integer

Detection feature rule ID

chk_feature_name

String

Detection feature rule ID

chk_feature_desc

String

Detection feature rule description

os_type

String

Definition

OS supported by the policy.

Constraints

N/A

Range

Its value can be:

  • Windows

  • Linux

Default Value

N/A

feature_configure

String

Detection feature rule configuration information

optional_protective_action

Integer

Available protection action. The options are as follows**:

  • 1: detect

  • 2: detect and block

  • 3: all

protective_action

Integer

Default protection action. The options are as follows**:

  • 1: detect

  • 2: detect and block

editable

Integer

Whether the configuration information can be edited. The options are as follows**:

  • 0: no

  • 1: yes

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "total_num" : 2,
  "data_list" : [ {
    "chk_feature_id" : 1,
    "chk_feature_name" : "zeroDay",
    "chk_feature_desc" : "command's stacks in the zeroDay blackList",
    "feature_configure" : "/guiserver/rule/create;/guiserver/rule/update",
    "optional_protective_action" : 3,
    "protective_action" : 1,
    "editable" : 1
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.