Querying a Risk Rule Policy
Function
This API is used to query a risk rule policy.
URI
GET /v1/{project_id}/{instance_id}/dbss/audit/rule/risk
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
instance_id |
Yes |
String |
Instance ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Risk name |
risk_levels |
No |
String |
Risk level [LOW,MEDIUM,HIGH,NO_RISK] |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
rules |
Array of rules objects |
List of risk rules |
total |
Integer |
Total |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Risk rule ID |
name |
String |
Risk rule name |
type |
String |
Risk type [OPERATION, LOGIN] |
feature |
String |
Risk characteristics CLIENT[Any]OPERATE[LOGIN][REVOKE,DROP TABLE,SELECT FOR UPDATE,SELECT,ROLLBACK,CREATE TABLESPACE,DELETE,GRANT,DROP USER,DROP TABLESPACE,UPDATE,INSERT,CREATE USER,CREATE TABLE]OBJECT[Any] |
status |
String |
Risk rule status[On,OFF] |
rank |
Integer |
Risk rule priority [1~8] |
risk_level |
String |
Risk level [No Risk,Low,Moderate,High] |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error |
Object |
Error message. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error information. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error |
Object |
Error message. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error information. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error |
Object |
Error message. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error information. |
Example Requests
/v1/{project_id}/{instance_id}/dbss/audit/rule/risk
Example Responses
Status code: 200
Success
{ "rules" : [ { "id" : "xX4W2ngBo47GiyUSBeOy", "name" : "Database_drag_detection", "type" : "OPERATE", "feature" : "CLIENT[Any]OPERATE[[SELECT]OBJECT[Any]", "status" : "ON", "rank" : 1, "risk_level" : "HIGH" }, { "id" : "xn4W2ngBo47GiyUSBeP4", "name" : "Database_Slow_SQL_Detection", "type" : "OPERATE", "feature" : "CLIENT[Any]OPERATE[[SELECT]OBJECT[Any]", "status" : "ON", "rank" : 2, "risk_level" : "LOW" } ], "total" : 2 }
Status code: 400
Invalid parameter.
{ "error" : { "error_code" : "DBSS.XXXX", "error_msg" : "XXX" } }
Status code: 500
Internal server error.
{ "error" : { "error_code" : "DBSS.XXXX", "error_msg" : "XXX" } }
Status Codes
Status Code |
Description |
---|---|
200 |
Success |
400 |
Invalid parameter. |
403 |
Authentication failed. |
500 |
Internal server error. |
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