Identity 模块 API 参考
1. 账号管理 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/account/send_email_code | POST | 发送注册验证码 | Account |
| /api/identity/account/register | POST | 注册 | Account |
| /api/identity/account/login | POST | 登录 | Account |
| /api/identity/account/send_login_verify_code | POST | 发送登录验证码 | Account |
| /api/identity/account/login_verify_code | POST | 根据验证码登录 | Account |
| /api/identity/account/refresh_token | POST | 刷新JWT | Account |
| /api/identity/account/logout | POST | 退出登录 | Account |
| /api/identity/account/verify_email | POST | 发送激活邮件 | Account |
| /api/identity/account/verify_email_comfirm | POST | 激活邮件 | Account |
| /api/identity/account/set_password | POST | 根据旧密码设置新密码 | Account |
| /api/identity/account/reset_password_email | POST | 发送重置密码的邮件 | Account |
| /api/identity/account/reset_password_link_confirm | POST | 根据发送的邮件链接,重置密码 | Account |
| /api/identity/account/reset_password_code_confirm | POST | 根据发送的邮件验证码,确认重置密码 | Account |
| /api/identity/account/captcha | GET | 生成无状态的登录验证码 | Account |
| /api/identity/account/captchaimg | GET | 验证码 | Account |
2. 通用附件 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/common-attachment | POST | 添加附件 | CommonAttachment |
| /api/identity/common-attachment | GET | 获取附件列表 | CommonAttachment |
/api/identity/common-attachment/{id} | DELETE | 删除附件 | CommonAttachment |
/api/identity/common-attachment/{entityId} | GET | 根据实体ID获取附件 | CommonAttachment |
| /api/identity/common-attachment/check_all_file_exists | PUT | 检查所有文件是否存在 | CommonAttachment |
3. 员工信息 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/employeeinfo | GET | 获取员工信息列表 | EmployeeInfo |
| /api/identity/employeeinfo | POST | 创建员工信息 | EmployeeInfo |
/api/identity/employeeinfo/{id} | GET | 获取员工信息详情 | EmployeeInfo |
/api/identity/employeeinfo/{id} | PUT | 更新员工信息 | EmployeeInfo |
/api/identity/employeeinfo/{id} | DELETE | 删除员工信息 | EmployeeInfo |
4. 文件管理 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/file/uploads | POST | 多文件上传 | File |
| /api/identity/file/upload | POST | 单文件上传,键为file | File |
| /api/identity/file/upload-from-url | POST | 根据URL获取文件并上传 | File |
/api/identity/file/{id} | GET | 获取文件详情 | File |
/api/identity/file/{id} | DELETE | 删除文件 | File |
/api/identity/file/{id} | PUT | 更新文件信息 | File |
| /api/identity/file | GET | 获取文件列表 | File |
| /api/identity/file/check_all_file_exists | PUT | 检测所有存在本地服务的文件是否实际存在,不存在更新IsFileExist 字段为false | File |
/api/identity/file/check_file_exists/{id} | GET | 检测文件是否实际存在 | File |
| /api/identity/file/create_avatar | GET | 实现一个姓名转头像 | File |
| /api/identity/file/create_avatar_url_by_name | GET | 根据文字上传头像 | File |
| /api/identity/file/get_random_avatar | GET | 获取随机头像 | File |
5. 日志管理 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/log/serilog | GET | Serilog日志 | Log |
/api/identity/log/{id} | GET | 获取日志详情 | Log |
/api/identity/log/{id} | DELETE | 删除serilog日志 | Log |
| /api/identity/log/dashboard | GET | 获取日志仪表板 | Log |
| /api/identity/log/batch | DELETE | 批量删除serilog日志 | Log |
| /api/identity/log/clear | DELETE | 清空日志 | Log |
| /api/identity/log/get_request_log | GET | 操作日志列表 | Log |
6. 在线用户 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/onlineuser | GET | 获取在线用户列表 | OnlineUser |
/api/identity/onlineuser/{id} | GET | 获取在线用户详情 | OnlineUser |
/api/identity/onlineuser/{id}/kick-out | POST | 强制用户下线 | OnlineUser |
| /api/identity/onlineuser/send-message | POST | 发送消息给在线用户 | OnlineUser |
7. 组织机构 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/orgunit | GET | 获取组织机构列表 | OrgUnit |
| /api/identity/orgunit | POST | 创建组织机构 | OrgUnit |
/api/identity/orgunit/{id} | GET | 获取组织机构详情 | OrgUnit |
/api/identity/orgunit/{id} | PUT | 更新组织机构 | OrgUnit |
/api/identity/orgunit/{id} | DELETE | 删除组织机构 | OrgUnit |
| /api/identity/orgunit/tree | GET | 获取组织机构树 | OrgUnit |
8. 权限管理 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/permission | GET | 获取权限列表 | Permission |
| /api/identity/permission | POST | 创建权限 | Permission |
/api/identity/permission/{id} | GET | 获取权限详情 | Permission |
/api/identity/permission/{id} | PUT | 更新权限 | Permission |
/api/identity/permission/{id} | DELETE | 删除权限 | Permission |
| /api/identity/permission/tree | GET | 获取权限树 | Permission |
| /api/identity/permission/grant | POST | 授权权限 | Permission |
/api/identity/permission/grant/{id} | DELETE | 撤销权限 | Permission |
| /api/identity/permission/grants | GET | 获取权限授权列表 | Permission |
| /api/identity/permission/copy-role-permissions | POST | 复制角色权限 | Permission |
| /api/identity/permission/copy-user-permissions | POST | 复制用户权限 | Permission |
9. 岗位管理 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/position | GET | 获取岗位列表 | Position |
| /api/identity/position | POST | 创建岗位 | Position |
/api/identity/position/{id} | GET | 获取岗位详情 | Position |
/api/identity/position/{id} | PUT | 更新岗位 | Position |
/api/identity/position/{id} | DELETE | 删除岗位 | Position |
| /api/identity/position/user-position | GET | 获取用户岗位列表 | Position |
| /api/identity/position/user-position | POST | 分配用户岗位 | Position |
/api/identity/position/user-position/{id} | DELETE | 移除用户岗位 | Position |
10. 个人资料 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/profile | GET | 获取个人资料 | Profile |
| /api/identity/profile | PUT | 更新个人资料 | Profile |
| /api/identity/profile/avatar | POST | 设置头像 | Profile |
| /api/identity/profile/change-password | POST | 修改密码 | Profile |
| /api/identity/profile/reset-password | POST | 重置密码 | Profile |
| /api/identity/profile/nickname | PUT | 更新昵称 | Profile |
| /api/identity/profile/verify | GET | 验证登录状态 | Profile |
11. 角色管理 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/role | GET | 获取角色列表 | Role |
| /api/identity/role | POST | 创建角色 | Role |
/api/identity/role/{id} | GET | 获取角色详情 | Role |
/api/identity/role/{id} | PUT | 更新角色 | Role |
/api/identity/role/{id} | DELETE | 删除角色 | Role |
| /api/identity/role/org-units | GET | 获取角色组织机构 | Role |
| /api/identity/role/org-units | POST | 分配角色组织机构 | Role |
/api/identity/role/org-units/{id} | DELETE | 移除角色组织机构 | Role |
12. 租户管理 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/tenant | GET | 获取租户列表 | Tenant |
| /api/identity/tenant | POST | 创建租户 | Tenant |
/api/identity/tenant/{id} | GET | 获取租户详情 | Tenant |
/api/identity/tenant/{id} | PUT | 更新租户 | Tenant |
/api/identity/tenant/{id} | DELETE | 删除租户 | Tenant |
| /api/identity/tenant/members | GET | 获取租户成员列表 | Tenant |
| /api/identity/tenant/members | POST | 添加租户成员 | Tenant |
/api/identity/tenant/members/{id} | DELETE | 移除租户成员 | Tenant |
13. 两步验证 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/twostepverification | GET | 获取两步验证状态 | TwoStepVerification |
| /api/identity/twostepverification/enable | POST | 启用两步验证 | TwoStepVerification |
| /api/identity/twostepverification/disable | POST | 禁用两步验证 | TwoStepVerification |
| /api/identity/twostepverification/verify | POST | 验证两步验证码 | TwoStepVerification |
| /api/identity/twostepverification/login | POST | 两步验证登录 | TwoStepVerification |
14. 用户访问密钥 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/useraccesskey | GET | 获取用户访问密钥列表 | UserAccessKey |
| /api/identity/useraccesskey | POST | 创建用户访问密钥 | UserAccessKey |
/api/identity/useraccesskey/{id} | GET | 获取用户访问密钥详情 | UserAccessKey |
/api/identity/useraccesskey/{id} | DELETE | 删除用户访问密钥 | UserAccessKey |
/api/identity/useraccesskey/{id}/status | PUT | 更新用户访问密钥状态 | UserAccessKey |
15. 用户管理 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/user | GET | 获取用户列表 | User |
| /api/identity/user | POST | 创建用户 | User |
/api/identity/user/{id} | GET | 获取用户详情 | User |
/api/identity/user/{id} | PUT | 更新用户 | User |
/api/identity/user/{id} | DELETE | 删除用户 | User |
| /api/identity/user/lockout | POST | 锁定用户 | User |
| /api/identity/user/unlock | POST | 解锁用户 | User |
| /api/identity/user/roles | GET | 获取用户角色 | User |
| /api/identity/user/roles | POST | 分配用户角色 | User |
/api/identity/user/roles/{id} | DELETE | 移除用户角色 | User |
| /api/identity/user/org-units | GET | 获取用户组织机构 | User |
| /api/identity/user/org-units | POST | 分配用户组织机构 | User |
/api/identity/user/org-units/{id} | DELETE | 移除用户组织机构 | User |
16. 用户快捷方式 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/usershortcut | GET | 获取用户快捷方式列表 | UserShortcut |
| /api/identity/usershortcut | POST | 创建用户快捷方式 | UserShortcut |
/api/identity/usershortcut/{id} | DELETE | 删除用户快捷方式 | UserShortcut |
| /api/identity/usershortcut/sort | PUT | 排序用户快捷方式 | UserShortcut |
17. 用户令牌 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/usertoken | GET | 获取用户令牌列表 | UserToken |
/api/identity/usertoken/{id} | DELETE | 删除用户令牌 | UserToken |
18. 数据字典 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/plat/item | GET | 获取数据字典项列表 | BaseItem |
| /api/plat/item/select | GET | 获取数据字典项选择列表 | BaseItem |
/api/plat/item/{id} | GET | 获取数据字典项详情 | BaseItem |
| /api/plat/item | POST | 创建数据字典项 | BaseItem |
/api/plat/item/{id} | PUT | 更新数据字典项 | BaseItem |
/api/plat/item/{id} | DELETE | 删除数据字典项 | BaseItem |
| /api/plat/type/list | POST | 获取数据字典分类列表 | BaseType |
/api/plat/type/{id} | GET | 获取数据字典分类详情 | BaseType |
| /api/plat/type | POST | 创建数据字典分类 | BaseType |
/api/plat/type/{id} | PUT | 更新数据字典分类 | BaseType |
/api/plat/type/{id} | DELETE | 删除数据字典分类 | BaseType |
19. 设置管理 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
| /api/identity/setting | GET | 获取设置列表 | Setting |
/api/identity/setting/{id} | GET | 获取设置详情 | Setting |
| /api/identity/setting | POST | 创建设置 | Setting |
/api/identity/setting/{id} | PUT | 更新设置 | Setting |
/api/identity/setting/{id} | DELETE | 删除设置 | Setting |
| /api/identity/setting/u/key_values | POST | 设置用户配置 | Setting |
/api/identity/setting/u/key/{key}/{userId} | GET | 获取指定用户的配置 | Setting |
/api/identity/setting/u/keys/{userId} | GET | 批量获取指定用户的配置 | Setting |
/api/identity/setting/u/key/{key} | GET | 获取当前用户的配置 | Setting |
| /api/identity/setting/u/keys | GET | 批量获取当前用户的配置 | Setting |
20. 第三方登录 API
| API路径 | 方法 | 描述 | 标签 |
|---|---|---|---|
/api/identity/oauth2/{provider}/login | GET | 第三方登录 | OAuth2 |
/api/identity/oauth2/{provider}/callback | GET | 第三方登录回调 | OAuth2 |
/api/identity/oauth2/{provider}/link | GET | 关联第三方账号 | OAuth2 |
/api/identity/oauth2/{provider}/unlink | POST | 解除第三方账号关联 | OAuth2 |
| /api/identity/oauth2/providers | GET | 获取支持的第三方登录提供商 | OAuth2 |