- 最新动态
- 功能总览
- 产品介绍
- 计费说明
- 快速入门
- 用户指南
- 最佳实践
- API参考
- SDK参考
- 场景代码示例
- 常见问题
- 视频帮助
- 文档下载
- 通用参考
链接复制成功!
查询模板规则关联关系
功能介绍
查询模板规则关联关系
调用方法
请参见如何调用API。
URI
GET /v1/{project_id}/scan-templates/{template_id}/scan-rules
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
项目ID |
template_id |
是 |
String |
模板ID |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
offset |
否 |
Integer |
页码 |
limit |
否 |
Integer |
分页大小 |
keyword |
否 |
String |
敏感信息对象名称关键字 |
classification_ids |
否 |
Array of strings |
分类ID |
security_level_ids |
否 |
Array of strings |
风险等级ID数组 |
is_used |
否 |
Boolean |
是否启用 |
rule_name |
否 |
String |
规则名称关键字 |
请求参数
无
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
total |
Long |
规则总数 |
scan_templates_list |
Array of TemplateRule objects |
规则列表 |
参数 |
参数类型 |
描述 |
---|---|---|
rule_id |
String |
规则ID |
project_id |
String |
项目ID |
rule_name |
String |
规则名称 |
template_id |
String |
模板ID |
classification_id |
String |
分级分类ID |
security_level_id |
String |
风险等级ID |
security_level_name |
String |
风险等级名称 |
security_level_color |
Integer |
风险等级 |
is_used |
Boolean |
是否启用 |
rule_description |
String |
规则名称 |
状态码:400
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码 |
error_msg |
String |
错误信息 |
请求示例
查询模板规则关联关系
GET /v1/{project_id}/scan-templates/{template_id}/scan-rules
响应示例
状态码:200
请求成功
{
"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
}
状态码:400
无效请求
{
"error_code" : "dsc.40000011",
"error_msg" : "Invalid parameter"
}
状态码
状态码 |
描述 |
---|---|
200 |
请求成功 |
400 |
无效请求 |
错误码
请参见错误码。