编辑数据
描述
根据数据ID修改表单中的单条数据
使用须知
开发前,请仔细阅读开发指南。
- POST请求头
{"Authorization": "Bearer YOUR_APIKEY"}
YOUR_APIKEY
请阅读开发指南了解。
接口URL
POST - /openapi/v1/app/{app_id}/entry/{entry_id}/data_update
名词解释
名称 | 说明 |
---|---|
app_id | 应用ID |
entry_id | 该应用内的表单ID |
app_id
+entry_id
表示全局唯一的表单标识,前往开发平台中的API文档进行查看。
请求参数
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
data_id | 51ec5515b659f88c17ee4fb8 | String | 是 | 数据id |
data | Object | 否 | 数据内容 | |
is_start_event | false | Boolean | 否 | 是否触发事件(模块事件/_form事件/数据助手) |
operator | 57c38102d8e647dcee87befc | String | 否 | 操作人id,默认使用应用所有者的id |
请求示例
{
"data_id": "51ec5515b659f88c17ee4fb8",
"data": {
"单行文本": "张三",
"多行文本": "webapi",
"数字": 8,
"日期时间": "2019-01-01 11:11:11",
"单选按钮组": "一年级",
"复选框组": [
"选项1",
"选项2"
],
"下拉框": "女",
"下拉复选框": [
"选项1",
"选项2"
],
"地址": {
"province": "湖南省",
"city": "长沙市",
"district": "芙蓉区",
"detail": "韶山北路"
},
"定位": {
"province": "湖南省",
"city": "长沙市",
"district": "芙蓉区",
"detail": "韶山北路",
"lnglatXY": [
112.99627,
28.19393
]
},
"图片": [
{
"name": "123.jpg",
"url": "https://www.xxxxx.com/FvNMG4BF9LEsbSv3HaO5gA9U0rQz"
}
],
"子表单": [
{
"单行文本_子表单": "张三"
},
{
"单行文本_子表单": "张三"
}
],
"成员单选": "5577ebc4504e8e77036d2a09",
"成员多选": [
"5577ebc4504e8e77036d2a09"
],
"部门单选": "51d1177b964603db9e60a962",
"部门多选": [
"51d1177b964603db9e60a962"
]
},
"is_start_event": false,
"operator": "57c38102d8e647dcee87befc"
}
响应参数
参数名 | 示例值 | 参数类型 | 参数描述 |
---|---|---|---|
data | - | Object | 数据内容 |
data.appId | 572177e6951f4dc54168c1eb | String | 应用id |
data.entryId | 5ebc5c2deee7ea61f7ac25df | String | 表单id |
data.creator | - | Object | 提交人 |
data.deleter | - | Object | 删除人 |
data.updater | - | Object | 更新人 |
data.createTime | 2022-01-19 15:06:53 | DateTime | 数据提交时间 |
data.updateTime | 2022-01-19 15:34:50 | DateTime | 数据更新时间 |
data.deleteTime | 2022-01-19 15:30:55 | DateTime | 数据删除时间 |
data._id | 51ec5515b659f88c17ee4fb8 | String | |
data.flowState | - | String | 流程状态,该字段仅流程表单支持 2表示流程手动结束 1表示流程已结束 0表示流程进行中 |
响应数据样例
{
"data": {
"appId": "572177e6951f4dc54168c1eb",
"entryId": "5ebc5c2deee7ea61f7ac25df",
"creator": {
"name": "张三",
"_id": "5d66359813f33ef2e45916f2"
},
"deleter": {
"name": "王小美",
"_id": "57c38102d8e647dcee87befc"
},
"updater": {
"name": "王小美",
"_id": "57c38102d8e647dcee87befc"
},
"createTime": "2022-01-19 15:06:53",
"updateTime": "2022-01-19 15:34:50",
"deleteTime": "2022-01-19 15:30:55",
"_id": "51ec5515b659f88c17ee4fb8",
"flowState": null,
"单行文本": "张三",
"多行文本": "webapi",
"数字": "8",
"日期时间": "2019-01-01 11:11:11",
"单选按钮组": "一年级",
"复选框组": [
"选项1",
"选项2"
],
"下拉框": "女",
"下拉复选框": [
"选项1",
"选项2"
],
"地址": {
"province": "湖南省",
"city": "长沙市",
"district": "芙蓉区",
"detail": "韶山北路"
},
"定位": {
"province": "湖南省",
"city": "长沙市",
"district": "芙蓉区",
"detail": "韶山北路",
"lnglatXY": [
112.99627,
28.19393
]
},
"图片": [
{
"name": "123.jpg",
"size": 68065,
"mime": "image/jpeg",
"url": "https://www.xxxxx.com/FvNMG4BF9LEsbSv3HaO5gA9U0rQz"
}
],
"附件": null,
"子表单": [
{
"单行文本_子表单": "张三"
},
{
"单行文本_子表单": "张三"
}
],
"流水号": "00011",
"手写签名": null,
"成员单选": {
"name": "万和",
"_id": "5577ebc4504e8e77036d2a09"
},
"成员多选": [
{
"name": "万和",
"_id": "5577ebc4504e8e77036d2a09"
}
],
"部门单选": {
"name": "人事部",
"_id": "51d1177b964603db9e60a962"
},
"部门多选": [
{
"name": "人事部",
"_id": "51d1177b964603db9e60a962"
}
]
}
}