Querying the Policy List of an Audit Scope
Function
This API is used to query the audit scope policy list.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/{instance_id}/dbss/audit/rule/scopes
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 |
Parameter Type |
Description |
---|---|---|---|
offset |
No |
String |
Offset |
limit |
No |
String |
Number of query records. |
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 |
---|---|---|
scopes |
Array of RuleScopeInfo objects |
Audit scope rule list |
total |
Integer |
Total number |
Parameter |
Parameter Type |
Description |
---|---|---|
id |
String |
Audit scope rule ID |
name |
String |
Audit scope name |
action |
String |
Actions in the audit scope |
status |
String |
Audit scope rule status |
exception_ips |
String |
Exception IP address of the audit scope |
source_ips |
String |
Source IP address of the audit scope rule |
source_ports |
String |
Port of the audit scope rule |
db_ids |
String |
Database ID |
db_names |
String |
Database name |
db_users |
String |
Database user |
all_audit |
Boolean |
Indicates if it is a full audit policy. The value is TRUE for the built-in full audit rule and FALSE for the user-defined full audit rule. |
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/scopes
Example Response
Status code: 200
Succeeded
{ "scopes" : [ { "id" : "zX4W2ngBo47GiyUSBuNs", "name": "Full Audit Rule, "action" : "", "status" : "ON", "exception_ips" : "", "source_ips" : "", "source_ports" : "", "db_ids" : "", "db_names" : "", "db_users" : "", "all_audit" : true } ], "total" : 1 }
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 |
Success |
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.