接口路径(新):http://api.okayapi.com/api/App/User_Set/Add
接口路径(旧):http://api.okayapi.com/?s=App.User_Set.Add
接口描述: 增 添加一个元素到用户的集合里
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
uuid | String | Required | MIN: 32;MAX: 32 | UUID,全局唯一用户ID | |
token | String | Required | MIN: 64;MAX: 64 | 会话凭证 | |
key | String | Required | MIN: 1;MAX: 64 | 集合名称 | |
data | ArrayJSON Format | Required | 元素数据,需要JSON编码后传递。JSON在线解析及格式化验证 | ||
keyword | String | Optaion | MAX: 100 | 关键字,可用于模糊搜索 | |
weight | Int | Optaion | 0 | 权重,可用于排序 | |
visiable | Enum | Optaion | private | Range: private/protected/public | 可见性,private为私有的,protected为受保护的,public为开放的 |
请求:
{OKAYAPI_API_HOST}/?s=App.User_Set.Add&key=students&data={"username":"dogstar","age":18}&keyword=dogstar&app_key={你的app_key}&sign={动态签名}
返回:
{
"ret": 200,
"data": {
"err_code": 0,
"err_msg": "",
"id": 65
},
"msg": ""
}
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0添加成功 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
id | Int | 新添加的元素ID(不同用户之间会有重复,但同一个用户的集合元素ID不会重复) |
接口路径(新):http://api.okayapi.com/api/App/User_Set/Update
接口路径(旧):http://api.okayapi.com/?s=App.User_Set.Update
接口描述: 改 更新用户集合里的某个元素
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
uuid | String | Required | MIN: 32;MAX: 32 | UUID,全局唯一用户ID | |
token | String | Required | MIN: 64;MAX: 64 | 会话凭证 | |
id | Int | Required | MIN: 1 | 元素ID | |
data | ArrayJSON Format | Required | 增量更新的元素数据,需要JSON编码后传递。JSON在线解析及格式化验证 | ||
keyword | String | Optaion | MAX: 100 | 待更新的关键字,为空时删除关键字 | |
weight | String | Optaion | 待更新的权重 |
请求:
{OKAYAPI_API_HOST}/?s=App.User_Set.Update&id=65&data={"sex":"男"}&app_key={你的app_key}&sign={动态签名}
返回:
{
"ret": 200,
"data": {
"err_code": 0,
"err_msg": ""
},
"msg": ""
}
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0更新成功,1元素不存在 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
接口路径(新):http://api.okayapi.com/api/App/User_Set/GetItem
接口路径(旧):http://api.okayapi.com/?s=App.User_Set.GetItem
接口描述: 查 获取用户集合里的某个元素
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
uuid | String | Required | MIN: 32;MAX: 32 | UUID,全局唯一用户ID | |
token | String | Required | MIN: 64;MAX: 64 | 会话凭证 | |
id | Int | Required | MIN: 1 | 元素ID | |
fields | ArraySeperated with , | Optaion | 需要获取的字段,默认取全部,多个字段用英文逗号分割 |
请求:
{OKAYAPI_API_HOST}/?s=App.User_Set.GetItem&id=65&app_key={你的app_key}&sign={动态签名}
返回:
{
"ret": 200,
"data": {
"err_code": 0,
"err_msg": "",
"id": 65,
"key": "students",
"data": {
"username": "dogstar",
"age": 18
},
"keyword": "dogstar",
"weight": "0",
"add_time": "2018-07-02 23:28:21",
"update_time": ""
},
"msg": ""
}
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0获取成功,1元素不存在 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
id | Int | 元素ID |
key | String | 键名 |
data | Object | 条目数据 |
keyword | String | 关键字 |
weight | Int | 权重 |
add_time | String | 添加时间,格式为:Y-m-d H:i:s |
update_time | String | 最后更新时间,格式为:Y-m-d H:i:s,若从未更新则为空 |
接口路径(新):http://api.okayapi.com/api/App/User_Set/Delete
接口路径(旧):http://api.okayapi.com/?s=App.User_Set.Delete
接口描述: 删 删除用户集合里的某个元素
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
uuid | String | Required | MIN: 32;MAX: 32 | UUID,全局唯一用户ID | |
token | String | Required | MIN: 64;MAX: 64 | 会话凭证 | |
id | Int | Required | MIN: 1 | 待删除的元素ID |
请求:
{OKAYAPI_API_HOST}/?s=App.User_Set.Delete&id=65&app_key={你的app_key}&sign={动态签名}
返回:
{
"ret": 200,
"data": {
"err_code": 0,
"err_msg": ""
},
"msg": ""
}
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0删除成功,1元素不存在 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
接口路径(新):http://api.okayapi.com/api/App/User_Set/Count
接口路径(旧):http://api.okayapi.com/?s=App.User_Set.Count
接口描述: 查 获取用户集合里的元素的总数
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
uuid | String | Required | MIN: 32;MAX: 32 | UUID,全局唯一用户ID | |
token | String | Required | MIN: 64;MAX: 64 | 会话凭证 | |
key | String | Required | MIN: 1;MAX: 64 | 集合名称 |
请求:
{OKAYAPI_API_HOST}/?s=App.User_Set.Count&key=students&app_key={你的app_key}&sign={动态签名}
返回:
{
"ret": 200,
"data": {
"err_code": 0,
"err_msg": "",
"total": 1
},
"msg": ""
}
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0表示成功,正数表示业务失败场景,负数表示系统失败场景 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
total | Int | 元素总数 |
接口路径(新):http://api.okayapi.com/api/App/User_Set/GetList
接口路径(旧):http://api.okayapi.com/?s=App.User_Set.GetList
接口描述: 查 获取用户集合里的元素列表
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
uuid | String | Required | MIN: 32;MAX: 32 | UUID,全局唯一用户ID | |
token | String | Required | MIN: 64;MAX: 64 | 会话凭证 | |
key | String | Required | MIN: 1;MAX: 64 | 集合名称 | |
page | Int | Optaion | 1 | MIN: 1 | 第几页 |
perpage | Int | Optaion | 10 | MIN: 1;MAX: 1000 | 分页数量 |
sort | String | Optaion | 1 | MIN: 1;MAX: 6 | 排序,1创建时间顺序,2创建时间逆序, 3权重顺序,4权重逆序,5更新时间顺序,6更新时间逆序;通过字符串拼接可组合排序,如41表示:权重逆序,创建时间顺序 |
请求:
{OKAYAPI_API_HOST}/?s=App.User_Set.GetList&key=students&app_key={你的app_key}&sign={动态签名}
返回:
{
"ret": 200,
"data": {
"err_code": 0,
"err_msg": "",
"items": [
{
"id": 65,
"key": "students",
"data": {
"username": "dogstar",
"age": 18
},
"keyword": "dogstar",
"weight": 0,
"add_time": "2018-07-02 23:28:21",
"update_time": ""
},
{
"id": 66,
"key": "students",
"data": {
"username": "yoyo",
"age": 18
},
"keyword": "yoyo",
"weight": 0,
"add_time": "2018-07-02 23:31:57",
"update_time": ""
}
],
"total": 2,
"page": 1,
"perpage": 10
},
"msg": ""
}
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0获取成功 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
items | Array | 元素列表 |
items[].id | Int | 元素ID |
items[].key | String | 键名 |
items[].data | Object | 条目数据 |
items[].keyword | String | 关键字 |
items[].weight | Int | 权重 |
items[].add_time | String | 添加时间,格式为:Y-m-d H:i:s |
items[].update_time | String | 最后更新时间,格式为:Y-m-d H:i:s,若从未更新则为空 |
total | Int | 元素总数 |
page | Int | 当前第几页 |
perpage | Int | 每页多少个 |
接口路径(新):http://api.okayapi.com/api/App/User_Set/Query
接口路径(旧):http://api.okayapi.com/?s=App.User_Set.Query
接口描述: 查 根据条件,查询用户集合里的元素列表
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
uuid | String | Required | MIN: 32;MAX: 32 | UUID,全局唯一用户ID | |
token | String | Required | MIN: 64;MAX: 64 | 会话凭证 | |
key | String | Required | MIN: 1;MAX: 64 | 集合名称 | |
keyword | String | Optaion | MAX: 100 | 待模糊搜索的关键字,不传时不搜索 | |
start_weight | String | Optaion | 权重范围,最小权重(包含),不传时不限制 | ||
end_weight | String | Optaion | 权重范围,最大权重(不包含,即前等后不等),不传时不限制 | ||
page | Int | Optaion | 1 | MIN: 1 | 第几页 |
perpage | Int | Optaion | 10 | MIN: 1;MAX: 1000 | 分页数量 |
sort | String | Optaion | 1 | MIN: 1;MAX: 6 | 排序,1创建时间顺序,2创建时间逆序, 3权重顺序,4权重逆序,5更新时间顺序,6更新时间逆序;通过字符串拼接可组合排序,如41表示:权重逆序,创建时间顺序 |
请求:
{OKAYAPI_API_HOST}/?s=App.User_Set.Query&key=students&keyword=dogstar&app_key={你的app_key}&sign={动态签名}
返回:
{
"ret": 200,
"data": {
"err_code": 0,
"err_msg": "",
"items": [
{
"id": 65,
"key": "students",
"data": {
"username": "dogstar",
"age": 18
},
"keyword": "dogstar",
"weight": 0,
"add_time": "2018-07-02 23:28:21",
"update_time": ""
}
],
"total": 1,
"page": 1,
"perpage": 10
},
"msg": ""
}
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0获取成功 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
items | Array | 元素列表 |
items[].id | Int | 元素ID |
items[].key | String | 键名 |
items[].data | Object | 条目数据 |
items[].keyword | String | 关键字 |
items[].weight | Int | 权重 |
items[].add_time | String | 添加时间,格式为:Y-m-d H:i:s |
items[].update_time | String | 最后更新时间,格式为:Y-m-d H:i:s,若从未更新则为空 |
total | Int | 元素总数 |
page | Int | 当前第几页 |
perpage | Int | 每页多少个 |
接口路径(新):http://api.okayapi.com/api/App/User_Set/Clear
接口路径(旧):http://api.okayapi.com/?s=App.User_Set.Clear
接口描述: 删 删除用户集合里的全部的元素
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
uuid | String | Required | MIN: 32;MAX: 32 | UUID,全局唯一用户ID | |
token | String | Required | MIN: 64;MAX: 64 | 会话凭证 | |
key | String | Required | MIN: 1;MAX: 64 | 待删除的集合名称 |
请求:
{OKAYAPI_API_HOST}/?s=App.User_Set.Clear&key=students&app_key={你的app_key}&sign={动态签名}
返回:
{
"ret": 200,
"data": {
"err_code": 0,
"err_msg": "",
"total": 1
},
"msg": "
}
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0表示成功,正数表示业务失败场景,负数表示系统失败场景 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
total | Int | 删除元素的总数 |
Power by OkayAPI.com Contact us (WA: okayapi OR Email: chanzonghuang@gmail.com).
Timezone: America/New_York Apr/26/2024 10:18:41