接口文档
Flexmodel API (0.0.1)
Download OpenAPI specification:Download
执行GraphQL查询
Request Body schema: application/json
operationName | string 操作名称 |
query | string 查询 |
object 变量 |
Responses
Request samples
- Payload
Content type
application/json
{- "operationName": "string",
- "query": "string",
- "variables": {
- "property1": null,
- "property2": null
}
}
Response samples
- 200
- 400
- 500
Content type
application/json
{- "errors": [
- {
- "message": "string",
- "locations": [
- {
- "line": 0,
- "column": 0,
- "sourceName": "string"
}
], - "errorType": { },
- "path": [
- null
], - "extensions": {
- "property1": null,
- "property2": null
}
}
], - "data": null,
- "dataPresent": true,
- "extensions": {
- "property1": null,
- "property2": null
}
}
Response samples
- 200
- 400
- 500
Content type
application/json
{- "id": -1,
- "type": "FOLDER",
- "path": "string",
- "meta": null,
- "name": "string",
- "createdAt": "2022-03-10T12:15:50",
- "updatedAt": "2022-03-10T12:15:50",
- "parentId": "string",
- "enabled": true,
- "method": "GET",
- "children": [
- {
- "id": "string",
- "name": "string",
- "parentId": "string",
- "type": "FOLDER",
- "method": "string",
- "path": "string",
- "createdAt": "2022-03-10T12:15:50",
- "updatedAt": "2022-03-10T12:15:50",
- "meta": null,
- "enabled": true,
- "children": [
- { }
]
}
]
}
创建接口定义
Request Body schema: application/json
id | string 唯一标识 |
type | string Enum: "FOLDER" "API" 类型, FOLDER: 文件夹;API: 接口 |
path | string 路径 |
meta | any 元数据,存放接口定义,例如graphql定义 |
name | string 名称 |
parentId | string 上级ID |
enabled | boolean Default: true 是否开启 |
method | string HTTP请求方法 |
Responses
Request samples
- Payload
Content type
application/json
{- "id": -1,
- "type": "FOLDER",
- "path": "string",
- "meta": null,
- "name": "string",
- "parentId": "string",
- "enabled": true,
- "method": "GET"
}
Response samples
- 200
- 400
- 500
Content type
application/json
{- "id": -1,
- "type": "FOLDER",
- "path": "string",
- "meta": null,
- "name": "string",
- "createdAt": "2022-03-10T12:15:50",
- "updatedAt": "2022-03-10T12:15:50",
- "parentId": "string",
- "enabled": true,
- "method": "GET"
}
根据模型生成接口定义
Request Body schema: application/json
datasourceName required | string\S |
modelName required | string\S |
apiFolder required | string\S |
idFieldOfPath required | string\S |
generateAPIs required | Array of strings non-empty |
Responses
Request samples
- Payload
Content type
application/json
{- "datasourceName": "string",
- "modelName": "string",
- "apiFolder": "string",
- "idFieldOfPath": "string",
- "generateAPIs": [
- "string"
]
}
Response samples
- 400
- 500
Content type
application/json
{- "code": 1001,
- "message": "参数验证异常",
- "success": false,
- "errors": [
- {
- "field": "name",
- "message": "不能为空"
}
]
}
更新接口定义
path Parameters
id required | string |
Request Body schema: application/json
id | string 唯一标识 |
type | string Enum: "FOLDER" "API" 类型, FOLDER: 文件夹;API: 接口 |
path | string 路径 |
meta | any 元数据,存放接口定义,例如graphql定义 |
name | string 名称 |
parentId | string 上级ID |
enabled | boolean Default: true 是否开启 |
method | string HTTP请求方法 |
Responses
Request samples
- Payload
Content type
application/json
{- "id": -1,
- "type": "FOLDER",
- "path": "string",
- "meta": null,
- "name": "string",
- "parentId": "string",
- "enabled": true,
- "method": "GET"
}
Response samples
- 200
- 400
- 500
Content type
application/json
{- "id": -1,
- "type": "FOLDER",
- "path": "string",
- "meta": null,
- "name": "string",
- "createdAt": "2022-03-10T12:15:50",
- "updatedAt": "2022-03-10T12:15:50",
- "parentId": "string",
- "enabled": true,
- "method": "GET"
}
更新接口定义(局部更新)
path Parameters
id required | string |
Request Body schema: application/json
id | string 唯一标识 |
type | string Enum: "FOLDER" "API" 类型, FOLDER: 文件夹;API: 接口 |
path | string 路径 |
meta | any 元数据,存放接口定义,例如graphql定义 |
name | string 名称 |
parentId | string 上级ID |
enabled | boolean Default: true 是否开启 |
method | string HTTP请求方法 |
Responses
Request samples
- Payload
Content type
application/json
{- "id": -1,
- "type": "FOLDER",
- "path": "string",
- "meta": null,
- "name": "string",
- "parentId": "string",
- "enabled": true,
- "method": "GET"
}
Response samples
- 200
- 400
- 500
Content type
application/json
{- "id": -1,
- "type": "FOLDER",
- "path": "string",
- "meta": null,
- "name": "string",
- "createdAt": "2022-03-10T12:15:50",
- "updatedAt": "2022-03-10T12:15:50",
- "parentId": "string",
- "enabled": true,
- "method": "GET"
}
获取接口日志列表
query Parameters
current | integer <int32> Default: 1 Example: current=1 当前页,默认值:1 |
pageSize | integer <int32> Default: 50 Example: pageSize=15 第几页,默认值:15 |
keyword | string 关键字 |
dateRange | string Example: dateRange=2025-01-01 00:00:00,2025-12-31 23:59:59 日期范围 |
level | string Example: level=INFO 日志等级 |
Responses
Response samples
- 200
- 400
- 500
Content type
application/json
{- "total": null,
- "list": [
- {
- "id": "string",
- "uri": "string",
- "level": "DEBUG",
- "createdAt": "2022-03-10T12:15:50",
- "data": null
}
]
}
创建数据源
Request Body schema: application/json
name | string 名称,需要唯一 |
type | string Enum: "SYSTEM" "USER" 数据源类型 |
config | object 数据源配置 |
enabled | boolean 是否启用 |
Responses
Request samples
- Payload
Content type
application/json
{- "name": "string",
- "type": "SYSTEM",
- "config": { },
- "enabled": true
}
Response samples
- 200
- 400
- 500
Content type
application/json
{- "name": "string",
- "type": "SYSTEM",
- "config": { },
- "enabled": true,
- "createdAt": "2022-03-10T12:15:50",
- "updatedAt": "2022-03-10T12:15:50"
}
获取物理数据库表名称
Request Body schema: application/json
name | string 名称,需要唯一 |
type | string Enum: "SYSTEM" "USER" 数据源类型 |
config | object 数据源配置 |
enabled | boolean 是否启用 |
Responses
Request samples
- Payload
Content type
application/json
{- "name": "string",
- "type": "SYSTEM",
- "config": { },
- "enabled": true
}
Response samples
- 200
- 400
- 500
Content type
application/json
[- "string"
]