- Survey
- SystemMenu
- 模板数据结构说明
- API接口
1. Survey
v1.0.0
1.1. SystemMenu
{menu1: "survey"} {menu1: "survey", menu2: "form"}
1.2. 模板数据结构说明
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | long | 是 | 模板id |
| body | body | object | 否 | none |
| title | body | string | 是 | 模板标题 |
| status | body | string | 是 | 填报状态 |
| connectionId | body | integer | 是 | 连接id |
| tablePath | body | [string] | 是 | 表路径 |
| table | body | string | 是 | 表名 |
| createdBy | body | integer | 是 | 创建者id |
| updatedBy | body | integer | 是 | 修改者id |
| createdAt | body | string | 是 | 创建时间 |
| updatedAt | body | string | 是 | 修改时间 |
| options | body | object | 是 | 配置 |
| » layout | body | string | 否 | none |
| » submitButton | body | object | 是 | 提交按钮配置 |
| »» title | body | string | 是 | 提交按钮标题 |
| » resetButton | body | object | 是 | 重置按钮配置 |
| »» enable | body | boolean | 是 | 是否开启重置按钮 |
| »» title | body | string | 是 | 重置按钮标题 |
| » closeDialog | body | boolean | 是 | 是否弹出关闭提示框 |
| controls | body | [object] | 是 | 控件列表 |
| » uuid | body | string | 是 | 控件唯一标识 |
| » title | body | string | 是 | 控件标题 |
| » inputType | body | string | 是 | 控件类型 |
| » type | body | string | 是 | 控件数据类型 |
| » fieldName | body | string | 是 | 控件绑定字段名称 |
| » visible | body | boolean | 否 | 是否显示 |
| » required | body | boolean | 否 | 是否必填 |
| » options | body | object | 是 | 控件配置 |
| »» defaultVal | body | string | 否 | 默认值 |
| »» maxLength | body | integer | 否 | 最大长度 |
| »» minLength | body | integer | 否 | 最小长度 |
| »» maxValue | body | integer | 否 | 最大值 |
| »» minValue | body | integer | 否 | 最小值 |
| »» placeholder | body | integer | 否 | 占位提示符 |
1.3. API接口
1.3.1. GET 简单信息列表
GET /api/surveys
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| title | query | string | 否 | 填报模板的标题 |
| orderBy | query | string | 否 | 排序字段 |
| orderType | query | string | 否 | 排序类型 |
| offset | query | integer | 否 | 偏移 |
| limit | query | integer | 否 | 数据条数 |
返回示例
成功
{
"data": [
{
"id": 26,
"title": "当精整清",
"status": "Lorem",
"createdBy": 39,
"updatedBy": 18,
"createdAt": "2020-05-22 22:30:20",
"updatedAt": "2011-04-13 04:51:05"
},
{
"id": 28,
"title": "之置张家京得",
"status": "labore ut officia",
"createdBy": 43,
"updatedBy": 92,
"createdAt": "2010-08-10 13:32:15",
"updatedAt": "2022-04-11 16:38:55"
}
],
"code": 36
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » data | [object] | true | none | none | |
| »» id | integer | true | none | none | |
| »» title | string | true | none | none | |
| »» status | string | true | none | none | |
| »» createdBy | integer | true | none | none | |
| »» updatedBy | integer | true | none | none | |
| »» createdAt | string | true | none | none | |
| »» updatedAt | string | true | none | none | |
| » code | integer | true | none | none |
1.3.2. GET 详细信息
GET /api/surveys/{id}
返回结果中control控件数组以控件在模板中的顺序返回
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | long | 是 | 模板id |
返回示例
成功
{
"code": 59,
"data": {
"id": 91,
"title": "界称报多院子题",
"status": "consequat labore mollit Ut qui",
"connectionId": 96,
"tablePath": [
"adasd",
"dasfs"
],
"table": "Ut veniam voluptate in",
"createdBy": 90,
"updatedBy": 91,
"createdAt": "1983-09-09 04:28:46",
"updatedAt": "1973-11-12 01:46:09",
"options": {
"layout": "nostrud",
"submitButton": {
"title": "县住比示"
},
"resetButton": {
"enable": false,
"title": "又半效极那"
},
"closeDialog": false
},
"controls": [
{
"title": "级长复置",
"type": "ullamco mollit eiusmod pariatur Lorem",
"uuid": "68",
"fieldName": "资权识位",
"inputType": "ut amet",
"required": false,
"options": {
"defaultVal": "sint culpa Ut cupidatat labore",
"maxLength": 19,
"minLenght": 83,
"maxValue": 70,
"minValue": 68,
"placeholder": 1
},
"visible": true
},
{
"title": "识少非类",
"type": "aliquip pariatur",
"visible": true,
"inputType": "ad id",
"required": true,
"options": {
"defaultVal": "laboris",
"maxLength": 29,
"minLenght": 95,
"maxValue": 48,
"minValue": 35,
"placeholder": 69
},
"fieldName": "却理查社们部",
"uuid": "61"
},
{
"title": "话约切细",
"required": false,
"inputType": "ut dolore esse sed",
"uuid": "14",
"visible": true,
"options": {
"defaultVal": "ut laborum reprehenderit",
"maxLength": 9,
"minLenght": 15,
"maxValue": 39,
"minValue": 56,
"placeholder": 93
},
"type": "nisi quis ea",
"fieldName": "容下动"
}
]
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » data | object | true | none | none | |
| »» id | integer | true | none | none | |
| »» title | string | true | none | none | |
| »» status | string | true | none | none | |
| »» connectionId | integer | true | none | none | |
| »» tablePath | [string] | true | none | none | |
| »» table | string | true | none | none | |
| »» createdBy | integer | true | none | none | |
| »» updatedBy | integer | true | none | none | |
| »» createdAt | string | true | none | none | |
| »» updatedAt | string | true | none | none | |
| »» options | object | true | none | none | |
| »»» layout | string | true | none | none | |
| »»» submitButton | object | true | none | none | |
| »»»» title | string | true | none | none | |
| »»» resetButton | object | true | none | none | |
| »»»» enable | boolean | true | none | none | |
| »»»» title | string | true | none | none | |
| »»» closeDialog | boolean | true | none | none | |
| »» controls | [object] | true | none | none | |
| »»» uuid | string | false | none | none | |
| »»» title | string | false | none | none | |
| »»» inputType | string | false | none | none | |
| »»» type | string | false | none | none | |
| »»» fieldName | string | false | none | none | |
| »»» visible | boolean | false | none | none | |
| »»» required | boolean | false | none | none | |
| »»» options | object | false | none | none | |
| »»»» defaultVal | string | true | none | none | |
| »»»» maxLength | integer | true | none | none | |
| »»»» minLenght | integer | true | none | none | |
| »»»» maxValue | integer | true | none | none | |
| »»»» minValue | integer | true | none | none | |
| »»»» placeholder | integer | true | none | none |
1.3.3. GET 填报页面
GET /api/surveys/{id}/submit
返回结果data中包含的是控件列表,也只返回控件列表
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | long | 是 | 模板id |
返回示例
成功
{
"code": 55,
"data": {
"options": {
},
"controls": []
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » data | [object] | true | none | none |
1.3.4. GET 获取填报模板设置
GET /api/surveys/{id}/setting
该接口依旧可以获取共享链接数据,但是共享链接的开启修改同app,不再使用修改模板配置接口
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | long | 是 | 模板id |
返回示例
成功
{
"share": {
"id": 42,
"hash": "Excepteur proident eu anim",
"options": {},
"objectType": "aute Excepteur fugiat",
"objectId": 24,
"createdBy": 35,
"createdAt": "1979-11-04 04:36:30",
"isDelete": false,
"title": "该那次越",
"enable": true
},
"allowUsers": {
"grantors": [
{
"loginName": "维几儿",
"name": "素放线各",
"id": 59
},
{
"loginName": "土为究族光",
"name": "建林书民状",
"id": 92
},
{
"name": "八百对斗",
"id": 10,
"loginName": "统严千构"
},
{
"name": "果表那总们",
"loginName": "具所外己",
"id": 74
},
{
"loginName": "支听平线给",
"id": 78,
"name": "六它须风完力眼"
}
],
"tenants": [
{
"id": 53,
"name": "联验向技着西"
},
{
"id": 68,
"name": "头去记例圆算图"
},
{
"name": "基求身果论起",
"id": 42
},
{
"name": "提易起新何",
"id": 48
},
{
"id": 90,
"name": "以标思"
}
],
"orgs": [
{
"name": "先术展任",
"id": 48
}
],
"organizations": [
{
"id": 90,
"name": "求立想日"
},
{
"name": "向成集什",
"id": 19
},
{
"name": "全间听",
"id": 19
},
{
"name": "去已力地命展中",
"id": 82
}
]
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » share | object | true | none | none | |
| »» id | integer | true | none | none | |
| »» hash | string | true | none | none | |
| »» options | object | true | none | none | |
| »» objectType | string | true | none | none | |
| »» objectId | integer | true | none | none | |
| »» createdBy | integer | true | none | none | |
| »» createdAt | string | true | none | none | |
| »» isDelete | boolean | true | none | none | |
| »» title | string | true | none | none | |
| »» enable | boolean | true | none | none | |
| » allowUsers | object | true | none | none | |
| »» grantors | [object] | true | none | none | |
| »»» id | integer | false | none | none | |
| »»» name | string | false | none | none | |
| »»» loginName | string | false | none | none | |
| »» tenants | [object] | true | none | none | |
| »»» id | integer | false | none | none | |
| »»» name | string | false | none | none | |
| »» orgs | [object] | true | none | none | |
| »»» id | integer | false | none | none | |
| »»» name | string | false | none | none | |
| »» organization | [object] | true | none | none | |
| »»» id | integer | false | none | none | |
| »»» name | string | false | none | none |
1.3.5. GET 获取表单数据
GET /api/surveys/{id}/data
详细参考数据集data接口
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | long | 是 | 模板id |
| offset | query | string | 否 | 偏移 |
| limit | query | string | 否 | 数据条数 |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.6. PUT 更新填报模板
PUT /api/surveys/{id}
返回同详细信息,改什么传什么,options与control为两个单独的整体,control如果是把所有控件删了请传空数组,null或者不传代表没改控件列表。
Body 请求参数
{
"title": "string",
"status": "string",
"connectionId": 0,
"tablePath": [
"dasd",
"dasf"
],
"table": "string",
"createdBy": 0,
"updatedBy": 0,
"createdAt": "string",
"updatedAt": "string",
"options": {
"layout": "string",
"submitButton": {
"title": "string"
},
"resetButton": {
"enable": true,
"title": "string"
},
"closeDialog": true
},
"controls": [
{
"uuid": "string",
"title": "string",
"inputType": "string",
"type": "string",
"fieldName": "string",
"visible": true,
"required": true,
"options": {
"defaultVal": "string",
"maxLength": 0,
"minLenght": 0,
"maxValue": 0,
"minValue": 0,
"placeholder": 0
}
}
]
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | long | 是 | 模板id |
| body | body | object | 否 | none |
| » title | body | string | 是 | none |
| » status | body | string | 是 | none |
| » connectionId | body | integer | 是 | none |
| » tablePath | body | [string] | 是 | none |
| » table | body | string | 是 | none |
| » createdBy | body | integer | 是 | none |
| » updatedBy | body | integer | 是 | none |
| » createdAt | body | string | 是 | none |
| » updatedAt | body | string | 是 | none |
| » options | body | object | 是 | none |
| »» layout | body | string | 否 | none |
| »» submitButton | body | object | 是 | none |
| »»» title | body | string | 是 | none |
| »» resetButton | body | object | 是 | none |
| »»» enable | body | boolean | 是 | none |
| »»» title | body | string | 是 | none |
| »» closeDialog | body | boolean | 是 | none |
| » controls | body | [object] | 是 | none |
| »» uuid | body | string | 是 | none |
| »» title | body | string | 是 | none |
| »» inputType | body | string | 是 | none |
| »» type | body | string | 是 | none |
| »» fieldName | body | string | 是 | none |
| »» visible | body | boolean | 否 | none |
| »» required | body | boolean | 否 | none |
| »» options | body | object | 是 | none |
| »»» defaultVal | body | string | 否 | none |
| »»» maxLength | body | integer | 否 | none |
| »»» minLength | body | integer | 否 | none |
| »»» maxValue | body | integer | 否 | none |
| »»» minValue | body | integer | 否 | none |
| »»» placeholder | body | integer | 否 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.7. PUT 修改填报模板设置
PUT /api/surveys/{id}/setting
改什么传什么,这个接口不再修改共享链接,共享链接的修改以及开启关闭同app的共享接口。唯一的变化是把objectType改成"survey"
Body 请求参数
{
"allowUsers": {
"grantors": [
{
"id": 0
}
],
"tenants": [
{
"id": 0
}
],
"orgs": [
{
"id": 0
}
],
"organizations": [
{
"id": 0
}
]
}
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | long | 是 | 模板id |
| body | body | object | 否 | none |
| » share | body | object | 是 | none |
| »» id | body | integer | 是 | none |
| »» hash | body | string | 是 | none |
| »» options | body | object | 是 | none |
| »» objectType | body | string | 是 | none |
| »» objectId | body | integer | 是 | none |
| »» createdBy | body | integer | 是 | none |
| »» createdAt | body | string | 是 | none |
| »» isDelete | body | boolean | 是 | none |
| »» title | body | string | 是 | none |
| »» enable | body | boolean | 是 | none |
| » allowUsers | body | object | 是 | none |
| »» grantors | body | [object] | 是 | none |
| »»» id | body | integer | 否 | none |
| »» tenants | body | [object] | 是 | none |
| »»» id | body | integer | 否 | none |
| »» orgs | body | [object] | 是 | none |
| »»» id | body | integer | 否 | none |
| »» organization | body | [object] | 是 | none |
| »»» id | body | integer | 否 | none |
返回示例
成功
{
"share": {
"id": 78,
"hash": "ea irure deserunt",
"options": {},
"objectType": "aute proident Duis",
"objectId": 42,
"createdBy": 56,
"createdAt": "2016-11-03 11:17:58",
"isDelete": false,
"title": "样用教准代系",
"enable": true
},
"allowUsers": {
"users": [
{
"id": 3,
"name": "土间此界",
"loginName": "相当才能要"
},
{
"loginName": "常即面接研",
"id": 90,
"name": "议设今什它出"
}
],
"tenants": [
{
"name": "信常亲委感院候",
"id": 71
},
{
"name": "红最理节难",
"id": 19
},
{
"name": "命断及论复外利",
"id": 16
},
{
"id": 56,
"name": "压众七集已始我"
},
{
"name": "体报色史验积容",
"id": 53
}
],
"orgs": [
{
"name": "角由满问效",
"id": 73
}
],
"organization": [
{
"name": "才件克住路维",
"id": 98
}
]
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » share | object | true | none | none | |
| »» id | integer | true | none | none | |
| »» hash | string | true | none | none | |
| »» options | object | true | none | none | |
| »» objectType | string | true | none | none | |
| »» objectId | integer | true | none | none | |
| »» createdBy | integer | true | none | none | |
| »» createdAt | string | true | none | none | |
| »» isDelete | boolean | true | none | none | |
| »» title | string | true | none | none | |
| »» enable | boolean | true | none | none | |
| » allowUsers | object | true | none | none | |
| »» users | [object] | true | none | none | |
| »»» id | integer | false | none | none | |
| »»» name | string | false | none | none | |
| »»» loginName | string | false | none | none | |
| »» tenants | [object] | true | none | none | |
| »»» id | integer | false | none | none | |
| »»» name | string | false | none | none | |
| »» orgs | [object] | true | none | none | |
| »»» id | integer | false | none | none | |
| »»» name | string | false | none | none | |
| »» organization | [object] | true | none | none | |
| »»» id | integer | false | none | none | |
| »»» name | string | false | none | none |
1.3.8. DELETE 删除填报模板
DELETE /api/surveys/{id}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | long | 是 | 模板id |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.9. POST 创建填报模板
POST /api/surveys
返回同详细信息
Body 请求参数
{
"title": "string"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | long | 是 | 模板id |
| body | body | object | 否 | none |
| » title | body | string | 是 | 模板标题 |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.10. POST 填写表单
POST /api/surveys/{id}/submit
Body 请求参数
{
"control-uuid": "string",
"control-uuid1": "string",
"control-uuid2": "string"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | long | 是 | 模板id |
| body | body | object | 否 | none |
| » control-uuid | body | string | 是 | 控件uuid的值 |
| » control-uuid1 | body | string | 是 | 控件uuid1的值 |
| » control-uuid2 | body | string | 是 | 控件uuid2的值 |
返回示例
200 Response
{}
异常示例
errorstatus Response
{
"code": 500,
"data": {
"control-uuid": "error-msg",
"control-uuid1": "error-msg1"
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.11. POST 复制填报模板
POST /api/surveys/{id}/duplicate
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | long | 是 | 模板id |
| newTitle | request param | string | 是 | 新的模板标题 |
1.3.12. PUT 更新数据
PUT /api/surveys/{id}/update
Body 请求参数
{
"01GVM95QGK47SVZWCDJ8SBJWWZ": "谢峰一号",
"01GVMMR5ZAAT8SHYTXQY3MKJDS": "没有手机",
"01GVMMSXNPQJMRMAQTX8H7VWET": "10212424@qq.com",
"01GVMMT2YAPQ2FS56GYEMRM0K9": "0745-2110869",
"uniqueKey": "64ed21f217204bba8d5163076ac56619"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Cookie | header | string | 是 | none |
| X-CSRF-Token | header | string | 是 | none |
| body | body | object | 否 | none |
| » 01GVM95QGK47SVZWCDJ8SBJWWZ | body | string | 是 | none |
| » 01GVMMR5ZAAT8SHYTXQY3MKJDS | body | string | 是 | none |
| » 01GVMMSXNPQJMRMAQTX8H7VWET | body | string | 是 | none |
| » 01GVMMT2YAPQ2FS56GYEMRM0K9 | body | string | 是 | none |
| » uniqueKey | body | string | 是 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.13. DELETE 删除数据
DELETE /api/surveys/{id}/delete
Body 请求参数
[
"9cb48184567f473d9447a1d3e1be1b8a"
]
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Cookie | header | string | 是 | none |
| X-CSRF-Token | header | string | 是 | none |
| body | body | array[string] | 否 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.14. POST 根据条件查询数据
POST /api/surveys/{id}/query
Body 请求参数
{
"kind": "function",
"op": "select_fields",
"args": [
{
"kind": "function",
"op": "filter",
"args": [
{
"kind": "dataset"
},
{
"kind": "function",
"op": "and",
"args": [
{
"kind": "function",
"op": "=",
"args": [
{
"kind": "field",
"op": "c1"
},
{
"kind": "constant",
"op": "111"
}
]
}
]
}
]
},
{
"kind": "field",
"op": "*"
}
]
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| offset | query | string | 是 | none |
| limit | query | string | 是 | none |
| Cookie | header | string | 是 | none |
| X-CSRF-Token | header | string | 是 | none |
| body | body | object | 否 | none |
| » args | body | [object] | 是 | none |
| »» args | body | [object] | 是 | none |
| »»» kind | body | string | 是 | none |
| »»» op | body | string | 是 | none |
| »» kind | body | string | 是 | none |
| »» op | body | string | 是 | none |
| » kind | body | string | 是 | none |
| » op | body | string | 是 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.15. POST 管理页面导出数据
POST /api/surveys/{id}/async-download-data
Body 请求参数
{
"kind": "function",
"op": "select_fields",
"args": [
{
"kind": "function",
"op": "filter",
"args": [
{
"kind": "dataset"
},
{
"kind": "function",
"op": "and",
"args": [
{
"kind": "function",
"op": "=",
"args": [
{
"kind": "field",
"op": "c1"
},
{
"kind": "constant",
"op": "123"
}
]
}
]
}
]
},
{
"kind": "field",
"op": "*"
}
]
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Cookie | header | string | 是 | none |
| X-CSRF-Token | header | string | 是 | none |
| body | body | object | 否 | none |
| » kind | body | string | 是 | none |
| » op | body | string | 是 | none |
| » args | body | [object] | 是 | none |
| »» kind | body | string | 是 | none |
| »» op | body | string | 是 | none |
| »» args | body | [object] | 否 | none |
| »»» kind | body | string | 是 | none |
| »»» op | body | string | 否 | none |
| »»» args | body | [object] | 否 | none |
| »»»» kind | body | string | 否 | none |
| »»»» op | body | string | 否 | none |
| »»»» args | body | [object] | 否 | none |
| »»»»» kind | body | string | 是 | none |
| »»»»» op | body | string | 是 | none |
返回示例
成功
```
#### 返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|-----|---------------------------------------------------------|-----|--------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | 成功 | Inline |
#### 返回数据结构
### GET 下载模板(可选携带数据)
GET /api/surveys/{id}/async-download-template
##### 请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|--------------|--------|--------|-----|------|
| withData | query | string | 是 | none |
| Cookie | header | string | 是 | none |
| X-CSRF-Token | header | string | 是 | none |
> 返回示例
> 200 Response
```json
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.16. POST 管理页面导入数据
POST /api/surveys/{id}/import
Body 请求参数
file: file:///Users/fx/Downloads/测试一号2023-03-16.xlsx
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Cookie | header | string | 是 | none |
| X-CSRF-Token | header | string | 是 | none |
| body | body | object | 否 | none |
| » file | body | string(binary) | 是 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.17. POST 填报页面导入数据
POST /api/surveys/{id}/submit-file
Body 请求参数
file: file:///Users/fx/Downloads/测试一号2023-03-16.xlsx
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Cookie | header | string | 是 | none |
| X-CSRF-Token | header | string | 是 | none |
| body | body | object | 否 | none |
| » file | body | string(binary) | 是 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.18. GET 下载填报页面导入数据错误
GET /api/surveys/{id}/async-download-submit-error
Body 请求参数
{ }
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| fileId | query | string | 是 | none |
| originType | query | string | 是 | none |
| requestId | query | string | 是 | none |
| Cookie | header | string | 是 | none |
| X-CSRF-Token | header | string | 是 | none |
| body | body | object | 否 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.19. GET 下载管理页面导入数据错误
GET /api/surveys/{id}/async-download-import-error
Body 请求参数
{ }
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| fileId | query | string | 是 | none |
| originType | query | string | 是 | none |
| requestId | query | string | 是 | none |
| Cookie | header | string | 是 | none |
| X-CSRF-Token | header | string | 是 | none |
| body | body | object | 否 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.20. GET 异步请求下载文件
GET /api/surveys/{id}/poll-download
Body 请求参数
{ }
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| originRequestId | query | string | 是 | none |
| Cookie | header | string | 是 | none |
| X-CSRF-Token | header | string | 是 | none |
| body | body | object | 否 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |
返回数据结构
1.3.21. GET 租户查询平台授权模板列表
GET /api/surveys/platform
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Cookie | header | string | 是 | none |
| X-CSRF-Token | header | string | 是 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 成功 | Inline |