查询报表
功能介绍
查询报表
URI
POST /v1/{project_id}/audit/{instance_id}/reports/list
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
参数解释: 项目ID。可通过IAM服务[查询指定IAM用户的项目列表]接口获取。 约束限制: 不涉及 取值范围: 以IAM服务接口返回值为准,字符长度32-64。 默认取值: 不涉及 |
|
instance_id |
是 |
String |
参数解释: 实例ID。可通过查询实例列表接口ID字段获取 约束限制: 不涉及 取值范围: 以查询实例列表接口值为准,字符长度32-64。 默认取值: 不涉及 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
参数解释: 用户Token。 通过调用IAM服务查询用户Token接口获取(响应消息头中X-Subject-Token的值)。 约束限制: 不涉及 取值范围: IAM服务查询用户Token接口为准 默认取值: 不涉及 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
name |
否 |
String |
报表名称 |
|
page |
是 |
Integer |
当前页码 |
|
size |
是 |
Integer |
每页条数 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
reports |
Array of ReportInfo objects |
报表对象列表 |
|
total |
Long |
总记录数 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
db_ids |
String |
数据库ID |
|
db_names |
String |
数据库名称 |
|
end_time |
String |
结束时间 |
|
finish_time |
String |
完成时间 |
|
format |
String |
格式
|
|
id |
String |
报表ID |
|
name |
String |
报表名称 |
|
percentum |
Integer |
进度 |
|
start_time |
String |
开始时间 |
|
template_type |
String |
报表类型
|
|
type |
String |
周期
|
|
url |
String |
地址URL |
状态码:400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
details |
Array of DbssErrorDetail objects |
PDP5鉴权异常信息 |
|
encoded_authorization_message |
String |
PDP5鉴权异常信息 |
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误信息 |
状态码:401
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
details |
Array of DbssErrorDetail objects |
PDP5鉴权异常信息 |
|
encoded_authorization_message |
String |
PDP5鉴权异常信息 |
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误信息 |
状态码:403
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
details |
Array of DbssErrorDetail objects |
PDP5鉴权异常信息 |
|
encoded_authorization_message |
String |
PDP5鉴权异常信息 |
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误信息 |
状态码:500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
details |
Array of DbssErrorDetail objects |
PDP5鉴权异常信息 |
|
encoded_authorization_message |
String |
PDP5鉴权异常信息 |
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误信息 |
请求示例
/v1/{project_id}/audit/{instance_id}/reports/list
{
"page" : 1,
"size" : 1
}
响应示例
状态码:200
OK
{
"total" : 1,
"reports" : [ {
"report" : {
"id" : "ocdwy5gBPj4d6CRt90sh",
"name" : "数据库安全综合报表",
"type" : "AUDIT_REPORT_REAL_TIME",
"format" : "pdf",
"percentum" : 100,
"url" : "/results/ocdwy5gBPj4d6CRt90sh/download-report",
"finish_time" : "2025-08-21 07:03:56",
"db_ids" : "",
"template_type" : "COMPREHENSIVE",
"start_time" : "2025-08-20 16:00:00",
"end_time" : "2025-08-21 07:03:31",
"db_names" : ""
}
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
|
400 |
请求参数有误。 |
|
401 |
认证失败 |
|
403 |
未授权 |
|
500 |
服务端错误 |
错误码
请参见错误码。