本文档详细描述 EIMSNext 企业信息管理系统后台 API 的功能、请求参数、响应格式、调用示例等信息,为开发者提供规范的 API 调用指南,助力快速集成系统功能。
EIMSNext 是一款企业低代码应用系统,提供身份验证、数据管理、流程控制、文件上传等全方位信息管理解决方案,支持通过 API 实现数据交互,基于 MongoDB 提供持久化存储支持。
所有 API 接口均采用 HTTP/HTTPS 协议进行通信。
请求与响应数据默认使用 JSON 格式(Content-Type: application/json)。
Authorization: Bearer {token}
| 参数名 < | 类型 < | 说明 < | 是否必填 |
|---|---|---|---|
| $top | int | 每页显示条数 | 否 |
| $skip | int | 跳过的记录数(分页偏移量) | 否 |
| $orderby | string | 排序字段(格式:字段名 asc/desc) | 否 |
POST/auth/sendcode
| 参数名 < | 类型 < | 说明 < | 是否必填 |
|---|---|---|---|
| phone | string | 手机号(接收验证码的载体) | 是 |
| type | string | 验证码类型(login/register/reset 等) | 是 |
POST/connect/token
Content-Type: application/x-www-form-urlencoded
| 参数名 < | 类型 < | 说明 < | 是否必填 |
|---|---|---|---|
| grant_type | string | 授权类型(password/code/sso 等) | 是 |
| username | string | 用户名(grant_type=password 时必填) | 否 |
| password | string | 密码(grant_type=password 时必填) | 否 |
| code | string | 验证码(grant_type=code 时必填) | 否 |
| client_id | string | 客户端 ID | 是 |
| client_secret | string | 客户端密钥 | 是 |
| scope | string | 权限范围(多个用空格分隔) | 是 |
POST/connect/token
Content-Type: application/x-www-form-urlencoded
| 参数名 < | 类型 < | 说明 < | 是否必填 |
|---|---|---|---|
| grant_type | string | 授权类型,固定为 refresh_token | 是 |
| refresh_token | string | 刷新令牌 | 是 |
| client_id | string | 客户端 ID | 是 |
| client_secret | string | 客户端密钥 | 是 |
同“获取访问令牌”
POST/api/v1/upload
Content-Type: multipart/form-data
| 参数名 < | 类型 < | 说明 < | 是否必填 |
|---|---|---|---|
| file | file | 上传的文件流 | 是 |
| folder | string | 存储文件夹(可选,默认存放在根目录) | 否 |
| isPublic | boolean | 是否公开访问(true/false,默认 false) | 否 |
POST/api/v1/workflow/start
Authorization: Bearer {token}
| 参数名 < | 类型 < | 说明 < | 是否必填 |
|---|---|---|---|
| flowDefinitionId | string | 流程定义 ID | 是 |
| businessKey | string | 业务关联键(如订单 ID、表单 ID) | 是 |
| variables | object | 流程变量(键值对格式,根据流程定义传入) | 否 |
| initiator | string | 流程发起人 ID | 是 |
POST/api/v1/workflow/approve
Authorization: Bearer {token}
| 参数名 < | 类型 < | 说明 < | 是否必填 |
|---|---|---|---|
| processInstanceId | string | 流程实例 ID | 是 |
| taskId | string | 待办任务 ID | 是 |
| approvalResult | string | 审批结果(agree/reject) | 是 |
| approvalComment | string | 审批意见 | 否 |
| approver | string | 审批人 ID | 是 |
| variables | object | 审批过程变量(可选) | 否 |
POST/api/v1/dataflow/run
Authorization: Bearer {token}
| 参数名 < | 类型 < | 说明 < | 是否必填 |
|---|---|---|---|
| dataFlowDefinitionId | string | 数据流定义 ID | 是 |
| inputData | object | 输入数据(根据数据流定义传入) | 是 |
| operator | string | 操作人员 ID | 是 |
GET/api/v1/{entityName}
注:entityName 为实体名称,如 form、user、department 等
Authorization: Bearer {token}
| 参数名 < | 类型 < | 说明 < | 是否必填 |
|---|---|---|---|
| $select | string | 筛选返回字段(多个用逗号分隔) | 否 |
| $filter | string | 过滤条件(如:name eq 'test' and status eq 1) | 否 |
| $top | int | 每页条数(分页) | 否 |
| $skip | int | 跳过条数(分页) | 否 |
| $orderby | string | 排序(如:createTime desc) | 否 |
| $expand | string | 关联查询(如:user.department) | 否 |
POST/api/v1/{entityName}
Authorization: Bearer {token}
实体对应的字段(键值对格式,根据实体定义传入)
PUT/api/v1/{entityName}/{id}
Authorization: Bearer {token}
需要更新的字段(键值对格式)
DELETE/api/v1/{entityName}/{id}
Authorization: Bearer {token}
appsettings.json
中的数据库连接信息
/swagger
路径)在线调试
dotnet test
运行
MongoTransactionScope
实现
V8ScriptEngine
DynamicFindOptions
实现