Help Center/ Data Security Center/ API Reference/ API Description/ Sensitive Data Identification/ Querying the Association Relationship Between Template Rules
Updated on 2025-07-09 GMT+08:00

Querying the Association Relationship Between Template Rules

Function

This API is used to query the association between template rules.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/scan-templates/{template_id}/scan-rules

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

template_id

Yes

String

Template ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Page.

limit

No

Integer

Page size.

keyword

No

String

Keyword of a sensitive information object name.

classification_ids

No

Array of strings

Classification ID.

security_level_ids

No

Array of strings

An array of risk level IDs.

is_used

No

Boolean

Whether to enable the rule.

rule_name

No

String

Keyword of a rule name.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

total

Long

Total number of rules.

template_rules_list

Array of TemplateRule objects

Rules.

Table 4 TemplateRule

Parameter

Type

Description

rule_id

String

Rule ID.

project_id

String

Project ID.

rule_name

String

Rule name.

template_id

String

Template ID.

classification_id

String

Category ID.

security_level_id

String

Risk level ID.

security_level_name

String

Risk level name.

security_level_color

Integer

Risk level.

is_used

Boolean

Whether to enable the rule.

rule_description

String

Rule name.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error Code

error_msg

String

Error Message

Example Requests

Query the association between template rules.

GET /v1/{project_id}/scan-templates/{template_id}/scan-rules

Example Responses

Status code: 200

Request sent.

{
  "template_rules_list" : [ {
    "project_id" : "xxxxxxxxxxxx",
    "template_id" : "xxxxxxxxxxxx",
    "classification_id" : "xxxxxxxxxxxx",
    "security_level_id" : "xxxxxxxxxxxx",
    "security_level_name" : "L1",
    "security_level_color" : 1,
    "rule_id" : "xxxxxxxxxxxx",
    "rule_name" : "xxxxxxxxxxxx",
    "is_used" : true,
    "rule_description" : "xxxxxxxxxxxx"
  } ],
  "total" : 1
}

Status code: 400

Invalid request.

{
  "error_code" : "dsc.40000011",
  "error_msg" : "Invalid parameter"
}

Status Codes

Status Code

Description

200

Request sent.

400

Invalid request.

Error Codes

See Error Codes.