tabledata接口
更新时间: 2022-12-05 15:32:27
接口说明
用于获取对应表的全部数据或指定 id 的某几条数据,同时也会返回表信息
权限说明
使用 token 访问,并且只能操作自己创建的数据填报表单
基本信息
属性 | 请求路径 |
---|---|
API | /api/dash/survey/datasource/tabledata |
请求方法 | POST |
请求参数
字段名称 | 参数类型 | 参数说明 |
---|---|---|
surveyId | Number | 数据填报 id |
Ids | [Number] | 可选,数字数组,对应数据的数据 id,如果传此参数则返回对应的 id 的数据 |
参数调用例子1
{
"surveyId": 95
}
成功返回
{
"code": 200,
"result": {
"fields": [
{
"name": "2cba0707-c0ab-d3cf-df48-c1f39be48428",
"comment": "数3344",
"type": "Decimal"
},
{
"name": "提交人",
"type": "String",
"comment": "提交人"
},
{
"name": "提交时间",
"type": "DateTime",
"comment": "提交时间"
},
{
"name": "id",
"type": "Whole",
"comment": "id",
"primaryKey": true
}
],
"data": [
[
"1",
"admin",
"2018-12-03 14:24:49",
56573
],
[
"1",
"admin",
"2018-12-03 14:27:59",
56574
],
[
"1",
"admin",
"2018-12-03 14:27:59",
56575
],
[
"1",
"admin",
"2018-12-03 14:27:59",
56576
],
[
"1",
"admin",
"2018-12-03 14:27:59",
56577
],
[
"1",
"admin",
"2018-12-03 14:27:59",
56578
],
[
"1",
"admin",
"2018-12-03 14:27:59",
56579
],
[
"1",
"admin",
"2018-12-03 14:27:59",
56580
],
[
"1",
"admin",
"2018-12-03 14:27:59",
56581
]
]
},
"logPath": "http://127.0.0.1:8009/operation/log/oDcvTEEMZwaSoe9GecmpfV"
}
参数调用例子2
{
"surveyId": 95,
"ids": [56573, 56574]
}
成功返回
{
"code": 200,
"result": {
"fields": [
{
"name": "2cba0707-c0ab-d3cf-df48-c1f39be48428",
"comment": "数3344",
"type": "Decimal"
},
{
"name": "提交人",
"type": "String",
"comment": "提交人"
},
{
"name": "提交时间",
"type": "DateTime",
"comment": "提交时间"
},
{
"name": "id",
"type": "Whole",
"comment": "id",
"primaryKey": true
}
],
"data": [
[
"1",
"admin",
"2018-12-03 14:24:49",
56573
],
[
"1",
"admin",
"2018-12-03 14:27:59",
56574
]
]
},
"logPath": "http://127.0.0.1:8009/operation/log/oDcvTEEMZwaSoe9GecmpfV"
}