Skip to content

系统操作记录

资源说明

系统操作记录从时间,操作者,IP,行为,结果,类别,对象,描述等方面记录了用户行为。 系统管理员可以从系统操作操作记录页面针对整个系统的用户行为进行审计工作,同时提供了时间,操作者,行为,类别的筛选功能和搜索功能。

系统操作记录的定义

系统操作记录结构说明

AuditLogDto
字段类型描述
actionSTRING操作行为
statusBOOLEAN操作结果状态
ipSTRINGIP
categorySTRING操作对象类别
objectSTRING操作对象名称
objectIdLONG操作对象ID
descriptionSTRING操作描述
createdByLONG操作用户ID
nameSTRING操作用户名称
createdAtSTRING操作时间
IdValueDto
字段类型描述
idOBJECT操作行为/类别枚举值
valueOBJECT操作行为/类别信息

接口说明

分页查询系统操作记录

请求URL

http
GET /api/audit-logs HTTP/1.1
Accept: application/json
Cookie: csrf=183f1c4...; sid=26ee552d...; _USER_SESSION_ID=f2a01083...

请求参数

URL 参数
字段类型是否必须说明
actionSTRING操作行为
categorySTRING操作对象类别
createdBySTRING操作用户ID
createdAtBeginSTRING操作开始时间
createdAtEndSTRING操作结束时间
qSTRING操作对象名称
limitINTEGER分页获取个数,默认是1000
offstINTEGER分页偏移量,默认是0

返回对象的格式说明

字段类型说明
versionSTRING当前系统版本哈希值
codeLong异常码
dataOBJECT 数组系统操作记录结构见系统操作记录结构说明
totalHitsINTEGER日志总数量
offsetINTEGER当前分页偏移量

接口示例

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...

请求参数

返回对象的格式说明

字段类型说明
versionSTRING当前系统版本哈希值
codeLong异常码
dataOBJECT 数组系统操作记录行为结构见系统操作记录结构说明

接口示例

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...

请求参数

返回对象的格式说明

字段类型说明
versionSTRING当前系统版本哈希值
codeLong异常码
dataOBJECT 数组系统操作记录类别结构见系统操作记录结构说明

接口示例

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": "填报数据"
    }
  ]
}

HENGSHI SENSE API 使用手册