Updated on 2026-05-12 GMT+08:00

Querying Protection Policy Details

Function

This API is used to query protection policy details. It queries the detection rules configured for a protection policy, including 14 types of detection rules.

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/policy/detail

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.

policy_id

Yes

String

Policy ID

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

policy_name

String

Protection policy name

os_type

String

Definition

OS type.

Range

The options are as follows:

  • Linux

  • Windows

rule_list

Array of CheckFeatureRuleInfo objects

list

Table 5 CheckFeatureRuleInfo

Parameter

Type

Description

chk_feature_id

Integer

Detection rule ID

chk_feature_name

String

Detection rule ID

chk_feature_desc

String

Detection rule description

feature_configure

String

Detection feature rule configuration information

protective_action

Integer

Action. The options are as follows:

  • 1: detect

  • 2: detect and block

optional_protective_action

Integer

Available protection action. The options are as follows:

  • 1: detect

  • 2: detect and block

  • 3: all

enabled

Integer

Enabling status. The options are as follows:

  • 0: enabled

  • 1: disabled

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

Protection policy details

{
  "policy_name" : "zsctest",
  "os_type" : "Linux",
  "rule_list" : [ {
    "chk_feature_id" : 1,
    "chk_feature_name" : "SQLI",
    "chk_feature_desc" : "Detect and defend against SQL injection attacks, and check web applications for related vulnerabilities.",
    "feature_configure" : "/hips/******-api/rasp/v1*****",
    "protective_action" : 1,
    "optional_protective_action" : 1,
    "enabled" : 1,
    "editable" : 0
  } ]
}

Status Codes

Status Code

Description

200

Protection policy details

Error Codes

See Error Codes.