Querying Audit Summary Information
Function
This API is used to query audit summary information.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/audit/summary/info
|
Parameter |
Mandatory |
Parameter Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
Parameter |
Mandatory |
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 |
|---|---|---|
|
project_id |
String |
Project ID. |
|
audit_duration |
Long |
Audit duration |
|
total_sql |
Long |
Total statements |
|
total_risk |
Long |
Total risk |
|
today_sql |
Long |
Today's statements |
|
today_risk |
Long |
Today's risk |
|
today_session |
Long |
Today's session |
|
update_time |
Long |
Time when the agent was updated |
|
data_list |
Array of data_list objects |
Task list |
|
Parameter |
Parameter Type |
Description |
|---|---|---|
|
id |
Long |
ID |
|
status |
String |
Status
|
|
project_id |
String |
Project ID |
|
instance_id |
Long |
Instance ID |
|
instance_name |
String |
Instance name |
|
audit_duration |
Long |
Audit duration |
|
total_sql |
Long |
Total statements |
|
total_risk |
Long |
Total risk |
|
today_sql |
Long |
Today's statements |
|
today_risk |
Long |
Today's risk |
|
today_session |
Long |
Today's session |
|
update_time |
Long |
Time when the agent was updated |
|
reserve1 |
String |
Reserved word 1 |
|
reserve2 |
String |
Reserved word 2 |
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
/v2/{project_id}/audit/summary/info
Example Response
Status code: 200
Audit summary information
{
"project_id" : "b9351f98c724428794ba7d105fa3558d",
"audit_duration" : 99423,
"total_sql" : 120267839,
"total_risk" : 1597508,
"today_sql" : 4354,
"today_risk" : 4354,
"today_session" : 4350,
"update_time" : 1712570404644,
"data_list" : [ {
"id" : 235049,
"status" : "1",
"reserve1" : null,
"reserve2" : null,
"project_id" : "b9351f98c724428794ba7d105fa3558d",
"instance_id" : 5542,
"instance_name" : "DBSS-mysql8-test",
"audit_duration" : 99423,
"total_sql" : 3537,
"total_risk" : 380,
"today_sql" : 0,
"today_risk" : 0,
"today_session" : 0,
"update_time" : 1712570404093
}, {
"id" : 235050,
"status" : "1",
"reserve1" : null,
"reserve2" : null,
"project_id" : "b9351f98c724428794ba7d105fa3558d",
"instance_id" : 5550,
"instance_name" : "DBSS-Q1-test",
"audit_duration" : 0,
"total_sql" : 148,
"total_risk" : 36,
"today_sql" : 0,
"today_risk" : 0,
"today_session" : 0,
"update_time" : 1712570404138
} ]
}
Status code: 400
Incorrect request parameter.
{
"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 |
Audit summary information |
|
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.