Updated on 2024-01-15 GMT+08:00

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

instance_id

Yes

String

Instance ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

name

No

String

Risk name

risk_levels

No

String

Risk level [LOW,MEDIUM,HIGH,NO_RISK]

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

rules

Array of rules objects

List of risk rules

total

Integer

Total

Table 5 rules

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

Table 6 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 7 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 9 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 11 ErrorDetail

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.