Querying a Risk Rule Policy
Function
This API is used to query a risk rule policy.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/{instance_id}/dbss/audit/rule/risk
Parameter |
Mandatory |
Parameter Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
instance_id |
Yes |
String |
Instance ID. You can obtain the value from the ID field in the API for querying the instance list. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Risk name |
risk_levels |
No |
String |
Risk severity.
|
Request Parameter
Parameter |
Mandatory |
Parameter Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. The token can be queried by calling the IAM API. (The token is the value of X-Subject-Token in the response header.) |
Response Parameters
Status code: 200
Parameter |
Parameter Type |
Description |
---|---|---|
rules |
Array of rules objects |
List of risk rules |
total |
Integer |
Total number |
Parameter |
Parameter Type |
Description |
---|---|---|
id |
String |
Risk rule ID |
name |
String |
Risk rule name |
type |
String |
Risk rule type. The options are as follows:
|
feature |
String |
Risk rule characteristics |
status |
String |
Risk rule status. The value can be:
|
rank |
Integer |
Risk rule priority. A smaller value indicates a higher priority. |
risk_level |
String |
Risk severity.
|
rule_type |
String |
Rule types. The value can be:
|
Status code: 400
Parameter |
Parameter Type |
Description |
---|---|---|
error |
Object |
Error message. |
Parameter |
Parameter Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 403
Parameter |
Parameter Type |
Description |
---|---|---|
error |
Object |
Error message. |
Parameter |
Parameter Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 500
Parameter |
Parameter Type |
Description |
---|---|---|
error |
Object |
Error message. |
Parameter |
Parameter Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Example Request
/v1/{project_id}/{instance_id}/dbss/audit/rule/risk
Example Response
Status code: 200
Succeeded
{ "rules" : [ { "id" : "xX4W2ngBo47GiyUSBeOy", "name" : "Database_drag_detection", "type" : "OPERATE", "feature" : "CLIENT[Any]OPERATE[[SELECT]OBJECT[Any]", "status" : "ON", "rank" : -1, "rule_type" : "CUSTOMIZE", "risk_level" : "HIGH" }, { "id" : "xn4W2ngBo47GiyUSBeP4", "name" : "Database_Slow_SQL_Detection", "type" : "OPERATE", "feature" : "CLIENT[Any]OPERATE[[SELECT]OBJECT[Any]", "status" : "ON", "rank" : -2, "rule_type" : "CUSTOMIZE", "risk_level" : "LOW" } ], "total" : 2 }
Status code: 400
Request Parameter Error
{ "error" : { "error_code" : "DBSS.XXXX", "error_msg" : "XXX" } }
Status code: 500
Internal server error.
{ "error" : { "error_code" : "DBSS.XXXX", "error_msg" : "XXX" } }
Status Code
Status Code |
Description |
---|---|
200 |
Request succeeded. |
400 |
Incorrect request parameter. |
403 |
Authentication failed. |
500 |
Internal server error. |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.