# 通过接口访问低开中的实体数据
# 1.场景介绍
在开发过程中,业务需要访问低开中的实体数据,平台提供了访问低开中实体数据的details接口。
本文以上述场景为例,讲解如何查看details接口并通过details接口访问低开中的实体数据。
# 2.效果展示

# 3.实现思路
获取details接口的方式有两种:
- 1.通过浏览的调试模式下查看details接口。
- 2.通过swagger接口文档查看。
# 4.操作步骤
# 4.1获取接口
# 4.1.1通过浏览的调试模式查看接口
进入订单视图页面,打开浏览器调试模式,点击列表的查看按钮。

此时查看浏览器调试器可以获取details接口:
http://127.0.0.1:28079/api/lowcode/models/2/details?entityName=form_order.order_data.testFormOrder&cascadeDeep=1
请求参数 | 说明 |
---|---|
entityName | 实体名称 |
form_order | 构建包名 |
order_data | 订单实体名 |
testFormOrder | 订单模型实体名 |
cascadeDeep=1 | 级联深度=1 |
entityName参数实际为模型实体位置,只写模型实体名会报错:
"ErrCode: 100020",
"Message: 通用模型类型'testFormOrder'不存在。",

# 4.1.2通过swagger接口文档查看接口
浏览器打开:http://ip:port/swagger-ui.html?urls.primaryName=lowcode#/低开通用数据模型管理/getDetailsUsingPOST_1

# 4.2接口的调用
通过接口调用工具可以调用接口获取实体数据,以PostMan为例:
- 添加Params参数:

- 添加Headers请求头:

- 点击send提交,获取实体数据:

← 根据选中行进行求和 表单中一次上传多个附件 →