OkayAPI Docs


API Path: /api/App/Table/MultiCheckCreate

API Description: PatchCUnique For batch operations, add multi distinct new data into table.

3
API Traffic
HTTP/HTTPS
Protocol
GET/POST
Method
UTF-8
Charset
JSON
Response

API Debug   


API Params

ParameterTypeRequiredDefaultNoteDescription
HTTP_APPKEYStringRequiredMIN: 32Common Put Your APPKEY
model_nameStringRequiredYour table Model Name
datasArrayJSON FormatRequired批量创建时的初始化数据,注意是数组格式,需要JSON编码后传递。格式:datas=[{"字段名1":"字段值1","字段名2":"字段值2"...}]。数据中的uuid将优先于model_uuid参数。JSON Parser Online
check_fieldArraySeperated with ,Required待检测的字段。注意:data数据中必须包含此字段的数据,用作检测重复的依据。多个检测字段用英文逗号分割。例如:check_field=name,age,表示同时检测名字和年龄。请留意字段类型的相等性判断,如字符串类型的字段不能在data参数中传整型参数。

API Debug

KEYREQUIREDVALUE
app_key *Required
model_name *Required
datas *Required
check_field *Required

API Response

KEYTypeDescription
err_codeInt状态操作码,0成功;1操作失败,2应用层规则拦截,拦截后可以小白开放平台查看日记
err_msgString错误提示信息,err_code非0时参考此提示信息
detailsArray创建的详情
details[].idInt客户端传递参数的序号,从1开始
details[].create_statusInt服务端创建非重复数据的状态,0表示创建添加成功,1表示创建失败,2表示数据已存在
details[].data_idInt数据ID,创建成功时是新添加数据的ID,数据存在时是原来数据的ID
details[].msgString创建时的错误提示信息

HTTP Response Code

HTTP Status CodeDescription
Http Status = 200Success
Http Status = 400Illegal-Params
Http Status = 401Illegal-Token
Http Status = 402IP-Banned
Http Status = 404API-NOT-Exsits
Http Status = 406Illegal-APPKEY
Http Status = 407APPKEY-Expired-Out
Http Status = 408APPKEY-Busy
Http Status = 409Illegal-Sign
Http Status = 413API-Traffic-NOT-Enough
Http Status = 415API-LOCKED
Http Status = 500Internal-Server-Error