主题
系统操作记录
资源说明
系统操作记录从时间,操作者,IP,行为,结果,类别,对象,描述等方面记录了用户行为。 系统管理员可以从系统操作操作记录页面针对整个系统的用户行为进行审计工作,同时提供了时间,操作者,行为,类别的筛选功能和搜索功能。
系统操作记录的定义
系统操作记录结构说明
AuditLogDto
字段 | 类型 | 描述 |
---|---|---|
action | STRING | 操作行为 |
status | BOOLEAN | 操作结果状态 |
ip | STRING | IP |
category | STRING | 操作对象类别 |
object | STRING | 操作对象名称 |
objectId | LONG | 操作对象ID |
description | STRING | 操作描述 |
createdBy | LONG | 操作用户ID |
name | STRING | 操作用户名称 |
createdAt | STRING | 操作时间 |
IdValueDto
字段 | 类型 | 描述 |
---|---|---|
id | OBJECT | 操作行为/类别枚举值 |
value | OBJECT | 操作行为/类别信息 |
接口说明
分页查询系统操作记录
请求URL
http
GET /api/audit-logs HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
请求参数
URL 参数
字段 | 类型 | 是否必须 | 说明 |
---|---|---|---|
action | STRING | 否 | 操作行为 |
category | STRING | 否 | 操作对象类别 |
createdBy | STRING | 否 | 操作用户ID |
createdAtBegin | STRING | 否 | 操作开始时间 |
createdAtEnd | STRING | 否 | 操作结束时间 |
q | STRING | 否 | 操作对象名称 |
limit | INTEGER | 是 | 分页获取个数,默认是1000 |
offst | INTEGER | 是 | 分页偏移量,默认是0 |
返回对象的格式说明
字段 | 类型 | 说明 |
---|---|---|
version | STRING | 当前系统版本哈希值 |
code | Long | 异常码 |
data | OBJECT 数组 | 系统操作记录结构见系统操作记录结构说明 |
totalHits | INTEGER | 日志总数量 |
offset | INTEGER | 当前分页偏移量 |
接口示例
http
GET /api/audit-logs?offset=0&limit=2 HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
http
HTTP/1.1 200 Ok
Content-Type: application/json
{
"version": "version@9a5e106#6730f0d",
"code": 0,
"msg": "success",
"data": [
{
"action": "创建",
"status": true,
"ip": "10.10.10.2",
"category": "数据集",
"object": "创意",
"description": "于应用 各租户通用市场投放数据",
"createdBy": 1,
"name": "admin",
"createdAt": "2023-04-27 11:13:17"
},
{
"action": "创建",
"status": true,
"ip": "10.10.10.2",
"category": "数据集",
"object": "订单表",
"description": "于应用 test",
"createdBy": 1,
"name": "admin",
"createdAt": "2023-04-27 11:13:15"
}
],
"totalHits": 20,
"offset": 0
}
列出系统操作记录的所有行为
请求URL
http
GET /api/audit-logs/actions HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
请求参数
无
返回对象的格式说明
字段 | 类型 | 说明 |
---|---|---|
version | STRING | 当前系统版本哈希值 |
code | Long | 异常码 |
data | OBJECT 数组 | 系统操作记录行为结构见系统操作记录结构说明 |
接口示例
http
GET /api/audit-logs/actions HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
http
HTTP/1.1 200 Ok
Content-Type: application/json
{
"version": "version@9a5e106#6730f0d",
"code": 0,
"msg": "success",
"data": [
{
"id": "login",
"value": "登录"
},
{
"id": "logout",
"value": "登出"
},
{
"id": "create",
"value": "创建"
},
{
"id": "edit",
"value": "编辑"
},
{
"id": "delete",
"value": "删除"
},
{
"id": "share",
"value": "分享"
},
{
"id": "export",
"value": "导出"
},
{
"id": "export-data",
"value": "导出数据"
},
{
"id": "import",
"value": "导入"
},
{
"id": "authorize",
"value": "授权"
},
{
"id": "transfer",
"value": "转移"
},
{
"id": "publish",
"value": "发布"
},
{
"id": "cancel-publish",
"value": "取消发布"
},
{
"id": "collaborate",
"value": "协作"
},
{
"id": "cancel-app-collaborate",
"value": "取消应用协作"
},
{
"id": "cancel-folder-collaborate",
"value": "取消目录协作"
},
{
"id": "submit-filling-data",
"value": "提交填报数据"
}
]
}
列出系统操作记录的所有类别
请求URL
http
GET /api/audit-logs/categories HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
请求参数
无
返回对象的格式说明
字段 | 类型 | 说明 |
---|---|---|
version | STRING | 当前系统版本哈希值 |
code | Long | 异常码 |
data | OBJECT 数组 | 系统操作记录类别结构见系统操作记录结构说明 |
接口示例
http
GET /api/audit-logs/categories HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...
http
HTTP/1.1 200 Ok
Content-Type: application/json
{
"version": "version@9a5e106#6730f0d",
"code": 0,
"msg": "success",
"data": [
{
"id": "system",
"value": "系统"
},
{
"id": "license",
"value": "软件授权"
},
{
"id": "user",
"value": "用户"
},
{
"id": "organization",
"value": "用户组"
},
{
"id": "connection",
"value": "数据连接"
},
{
"id": "app",
"value": "应用"
},
{
"id": "dashboard",
"value": "仪表盘"
},
{
"id": "dataset",
"value": "数据集"
},
{
"id": "chart",
"value": "图表"
},
{
"id": "configuration",
"value": "配置"
},
{
"id": "app-rule",
"value": "应用规则"
},
{
"id": "resource",
"value": "资源"
},
{
"id": "appParam",
"value": "应用参数"
},
{
"id": "extend-dataset",
"value": "关联模型"
},
{
"id": "api",
"value": "API"
},
{
"id": "api-set",
"value": "API 组"
},
{
"id": "folder",
"value": "文件夹"
},
{
"id": "kpi-chart",
"value": "图表库"
},
{
"id": "pipeline",
"value": "数据集成"
},
{
"id": "userAttr",
"value": "用户属性"
},
{
"id": "dashboard-theme",
"value": "仪表盘主题"
},
{
"id": "data-alert",
"value": "数据预警"
},
{
"id": "survey",
"value": "数据填报"
},
{
"id": "survey-data",
"value": "填报数据"
}
]
}