Files
easygoadmin-wiki/EasyGoAdmin_GoFrame_NaiveVue/zh/appendix/api-cheatsheet.md
T
2026-10-20 21:53:26 +08:00

92 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# E. API 接口速查表
:::tip 概述
全部接口速查(按模块)。完整权威清单以 `GET /api.json` 为准(gmeta 自动生成)。约定:无 /v1 版本段;认证 `Authorization: Bearer`;分页 pageNo/pageSize。
:::
## 公开与基础设施
```text
POST /api/login 登录(返回 access_token 等四字段)
GET /api/captcha 图形验证码
POST /api/oauth2/token 令牌刷新/密码模式
GET /api/health 健康检查
GET /swagger · /api.json API 文档
GET /api/logout 登出
GET /api/oauth2/check/token 校验令牌
DELETE /api/oauth2/remove/:token 撤销令牌
```
## index 个人中心(登录即可)
```text
GET /api/index/getUser · /getMenus · /getMenus/:id
PUT /api/index/updatePassword · /updateProfile
```
## system 域(七件套 + 扩展)
```text
/user page list detail add update status resetPwd delete batchDelete import export document
权限 sys:user:*;resetPwd=logType reset
/role 七件套 + menu/list/:roleId(getPermission)+ menu/save(savePermission)
dataScope 四档(in:1,2,3,4)
/menu 七件套(List 树形)
/dept 七件套(List 树形;删除守卫)
/level 七件套 + status + import + export
/position 七件套 + status
/tenant 七件套 + status + account(开户)+ users/:tenantId
```
## data 域
```text
/config 七件套 + web/index + web/save(sys:configWeb:*)
/config/item 七件套(sys:configitem:*)
/param 七件套
/dict 七件套(无 list)+ refreshCache;别名 /api/dictionary/list|info
/dict/item 七件套 + getDictItemList/:code
/notice 七件套 + status
/city 七件套 + getCityList/:parentCode;别名 /api/area/getParent|findByParentCode
```
## content 域
```text
/article 七件套 + status(富文本/多图)
/category 七件套(List 树形)
/link 七件套(无 status)
```
## monitor 域
```text
/oper/log page list detail delete batchDelete(sys:operLog:*,仅查询删除)
/login/log 同上五件(sys:loginLog:*)
/job/log 同上五件(sys:jobLog:*)
/job 七件套 + runOnce/:id + pause/:id + resume/:id + status + daemonStatus
/onlineUser page detail/:id forceLogout/:id forceLogoutUser/:userId(无表)
/server info(登录即可,无表)
/cache info(登录即可,无表)
```
## tool 域
```text
/example 七件套 + status + import + export
/file/template 七件套 + getTemplateByCode/:code
/generator page preview generate batchGenerate
/upload uploadFile uploadFiles(multipart 字段 file)
```
## 速记规律
```text
标准七件套:GET page/list/detail/:id · POST add · PUT update ·
DELETE delete/:id · batchDelete(body {ids:[]})
扩展:status(PUT)/ import(POST multipart)/ export(GET 同筛选)
权限:sys:{模块小驼峰}:{动作};超管绕过
日志:gmeta log "{模块中文名}-{动作}" + logType
公开:仅 login/register/captcha/oauth2/token/health(白名单三处一致)
```