接口路径(新):http://api.okayapi.com/api/SVIP/Dsq_NtData/MultiInsertOrUpdate
接口路径(旧):http://api.okayapi.com/?s=SVIP.Dsq_NtData.MultiInsertOrUpdate
接口描述: 批量插入数据到某张表,如果根据queryField字段判断数据已存在则更新。不能插入或更新id字段。【有效期至:2019-03-11】
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
database | String | Optaion | super | 需要使用的数据库,super表示ntdata数据库 | |
table | String | Required | 需要批量插入哪张表,需要要传完整的表名,如,table=nt_fansdata | ||
query_field | String | Required | MIN: 1 | 需要根据哪个字段判断是否存在,必须要是表的唯一索引,或至少需要普通索引。如,query_field=fans_data | |
data | ArrayJSON Format | Required | MIN: 1;MAX: 1000 | 待批量插入或者更新的数据,格式为一个数组,使用JSON格式,每组的数据字段不一定需要相同,但query_field字段应包含在内。如,data=[待插入的数据1, 待插入的数据2, ……] |
KEY | Type | Description |
---|---|---|
details | Array | 插入或更新的明细,方便开发调试查看。insert表示已插入,update表示已更新,error表示错误 |
stat.total | Int | 总条目数量 |
stat.insert | Int | 成功插入的数量 |
stat.update | Int | 成功更新的数量 |
stat.error | Int | 失败的数量 |
接口路径(新):http://api.okayapi.com/api/SVIP/Dsq_NtData/MultiInsertOrUpdateByMultiKey
接口路径(旧):http://api.okayapi.com/?s=SVIP.Dsq_NtData.MultiInsertOrUpdateByMultiKey
接口描述: 批量插入数据到某张表,如果根据queryField字段判断数据已存在则更新。不能插入或更新id字段。【有效期至:2019-03-11】
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
database | String | Optaion | super | 需要使用的数据库,super表示ntdata数据库 | |
table | String | Required | 需要批量插入哪张表,需要要传完整的表名,如,table=nt_fansdata | ||
query_field | String | Required | MIN: 1 | 需要根据哪个字段判断是否存在,必须要是表的索引,或至少需要普通索引。多个字段用逗号隔开,如,query_field=fans_data,fans_wxid | |
data | ArrayJSON Format | Required | MIN: 1;MAX: 1000 | 待批量插入或者更新的数据,格式为一个数组,使用JSON格式,每组的数据字段不一定需要相同,但query_field字段应包含在内。如,data=[待插入的数据1, 待插入的数据2, ……] |
KEY | Type | Description |
---|---|---|
details | Array | 插入或更新的明细,方便开发调试查看。insert表示已插入,update表示已更新,error表示错误 |
stat.total | Int | 总条目数量 |
stat.insert | Int | 成功插入的数量 |
stat.update | Int | 成功更新的数量 |
stat.error | Int | 失败的数量 |
Power by OkayAPI.com Contact us (WA: okayapi OR Email: chanzonghuang@gmail.com).
Timezone: America/New_York Apr/17/2024 23:05:45