Skip to content

misc — 杂项(审计/日志/字典/通知)(5 action · 全只读) ​

前缀:/api/v1/admin/misc/ 权限:全部 MISC_READ — 仅 super + it,operator 一律 403 代码:src/app/admin/interface/api/misc_mgmt.py + application/usecase/misc_mgmt.py ⚠️ §3.12.5 POST(MISC_WRITE)不在九权限矩阵 — P3 仅实现 GET

3.12.1 audit-logs —— 审计日志(审计闭环回查点) ​

GET /api/v1/admin/misc/audit-logs · 权限 MISC_READ

P1 起全部写操作(operator_id + before / after + ip + ua)的审计留痕,在此闭环回查。

Query 参数:

字段类型必填默认说明
pageint⬜1≥1
page_sizeint⬜201~100
admin_idstring⬜—按操作 admin 过滤
action_typestring⬜—动作类型(如 ADMIN_LOGOUT / ADMIN_IMPERSONATE)
date_from / date_tostring⬜—ISO 日期区间

响应 data:{ total, page, page_size, items: [AuditLog 原始记录] }(含 operator_id / action / before / after / ip / ua / created_at)

错误码:40201001 日期格式非法;40201761 查询失败(防御性 — 只读路径无自然触发)。

3.12.2 operation-logs —— 操作日志 ​

GET /api/v1/admin/misc/operation-logs · 权限 MISC_READ

Query:page / page_size / level / date_from / date_to

响应 data:{ total, page, page_size, items }

错误码:40201001。

3.12.3 error-logs —— 错误日志 ​

GET /api/v1/admin/misc/error-logs · 权限 MISC_READ

Query:page / page_size / severity / module / date_from / date_to

响应 data:{ total, page, page_size, items }

错误码:40201001。

3.12.4 data-dictionary —— 数据字典(只读双入口) ​

GET /api/v1/admin/misc/data-dictionary · 权限 MISC_READ

与 config/dictionary 同源双入口:本入口 MISC_READ 只读(取证/排查视角),CRUD 在 config 域(CONFIG_WRITE)。

Query:type(可选)

响应 data:{ "total": <n>, "items": [{type, code, label, value, sort}] }

3.12.5 notifications —— 站内通知 ​

GET /api/v1/admin/misc/notifications · 权限 MISC_READ

(提现审批 / 订单退款 / 授权失效等链路落库的通知,分页回查。)

Query:

字段类型必填默认说明
pageint⬜1≥1
page_sizeint⬜201~100
target_rolestring⬜—面向角色过滤

响应 data:{ total, page, page_size, items }

错误码:40201001。


本域错误码汇总:40201761-40201762(§6.9 misc 区段 — 防御性)。通用失败见 admin 总览。