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
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
template_id |
Yes |
String |
Template ID. |
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
Parameter |
Type |
Description |
---|---|---|
total |
Long |
Total number of rules. |
template_rules_list |
Array of TemplateRule objects |
Rules. |
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
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot