Skip to main content

授权审计列表

授权审计列表

接口描述
  • 通过该接口获取系统中授权审计列表
请求URL
  • http://host/bbm/v2/adapter/bomber/privilege/record/list
请求方式
  • ==GET==
header 请求头参数
参数名必选类型说明示例值及参考API
content-typestringapplication/json
Authorizationstring签名描述Bearer + 登录token
请求参数
参数名必选类型说明示例值及参考API
operator_idstring操作人
typestring类型 角色权限/用户权限/临时权限
target_role_idint授权角色
target_user_idint授权用户
limtint返回个数 默认10个
请求示例
http://host/bbm/v2/adapter/bomber/privilege/record/list?type=角色权限

请求参数示例

返回参数说明

  • http_status && status_code 为200 为成功
  • 否则均为失败或者异常
字段字段示例字段说明是否必填
id1主键id
operator_id操作人id
operator_name操作人名称
type类型 角色权限/用户权限/临时权限
target目标用户/角色
target_role_id角色id
target_role_name角色名称
target_user_id用户id
target_user_name用户名称
db_id数据id
db_type数据库类型
db_name_info数据库名称
schema
table
content内容
expire_data_start有效时间开始时间
expire_data_end有效时间结束时间
time_range时间区间
created_at创建时间
返回示例
{
"status_code": 200,
"code": "",
"message": "",
"detail": "",
"alert": "",
"to_wiki": "",
"data": [
{
"id": 418,
"operator_id": 0,
"operator_name": "admin",
"type": "角色权限",
"target": "角色 dev ",
"target_role_id": 631,
"target_role_name": "dev",
"target_user_id": 0,
"target_user_name": "",
"db_id": 0,
"db_type": "",
"db_name_info": "",
"schema": "",
"table": "",
"content": "admin授权给 角色 dev [export,select,view] 权限",
"expire_data_start": 0,
"expire_data_end": 0,
"time_range": [
{
"friday": true,
"monday": true,
"sunday": true,
"to_time": "23:59",
"tuesday": true,
"saturday": true,
"thursday": true,
"from_time": "00:00",
"wednesday": true
}
],
"created_at": 1730429059
},
{
"id": 417,
"operator_id": 0,
"operator_name": "aa",
"type": "用户权限",
"target": "用户 dba ",
"target_role_id": 0,
"target_role_name": "",
"target_user_id": 46730,
"target_user_name": "dba",
"db_id": 3299,
"db_type": "mysql",
"db_name_info": "192.168.0.167(bbtest@192.168.0.167:3306/bbtest)",
"schema": "",
"table": "",
"content": "aa授权给用户 dba 数据名库为 192.168.0.167(bbtest@192.168.0.167:3306/bbtest) [select]权限",
"expire_data_start": 0,
"expire_data_end": 0,
"time_range": [
{
"friday": true,
"monday": true,
"sunday": true,
"to_time": "23:59",
"tuesday": true,
"saturday": true,
"thursday": true,
"from_time": "00:00",
"wednesday": true
}
],
"created_at": 1730171357
}
]
}