获取报表模板
功能介绍
获取报表模板
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v2/{project_id}/audit/{instance_id}/reports/templates
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
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接口为准 默认取值: 不涉及 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
os_type |
String |
os类型 |
|
templates |
Array of TemplateInfo objects |
模板列表 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
db_ids |
String |
数据库ID |
|
db_names |
String |
数据库名称 |
|
desc |
String |
描述 |
|
frequency |
String |
周期 |
|
group |
String |
类型
|
|
id |
String |
模板ID |
|
name |
String |
报表模板名称 |
|
status |
String |
状态
|
|
type |
String |
报表类型
|
状态码: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 |
错误信息 |
请求示例
/v2/{project_id}/audit/{instance_id}/reports/templates
响应示例
状态码:200
OK
{
"templates" : [ {
"template" : {
"id" : "t8g7LJgBTpKZyZbbeTgS",
"name" : "数据库安全综合报表",
"type" : "COMPREHENSIVE",
"group" : "COMPREHENSIVE",
"frequency" : "AUDIT_REPORT_WEEK",
"status" : "ON",
"desc" : "数据库安全综合报表",
"db_ids" : "",
"db_names" : ""
}
} ],
"os_type" : "amd64"
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
|
400 |
请求参数有误。 |
|
401 |
认证失败 |
|
403 |
未授权 |
|
500 |
服务端错误 |
错误码
请参见错误码。