OkayAPI Docs
API Params
| Parameter | Type | Required | Default | Note | Description |
|---|---|---|---|---|---|
| HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
| uuid | String | Optaion | MIN: 32;MAX: 32 | UUID,全局唯一用户ID | |
| token | String | Optaion | 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 | 权重,可用于排序 |
API Debug
| KEY | REQUIRED | VALUE |
|---|---|---|
| app_key | *Required | |
| uuid | Option | |
| token | Option | |
| key | *Required | |
| data | *Required | |
| keyword | Option | |
| weight | Option |
API Response
| KEY | Type | Description |
|---|---|---|
| err_code | Int | 操作码,0添加成功 |
| err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
| id | Int | 新添加的元素ID(全局的集合元素ID是唯一的) |
HTTP Response Code
| HTTP Status Code | Description |
|---|---|
| Http Status = 200 | Success |
| Http Status = 400 | Illegal-Params |
| Http Status = 401 | Illegal-Token |
| Http Status = 402 | IP-Banned |
| Http Status = 404 | API-NOT-Exsits |
| Http Status = 406 | Illegal-APPKEY |
| Http Status = 407 | APPKEY-Expired-Out |
| Http Status = 408 | APPKEY-Busy |
| Http Status = 409 | Illegal-Sign |
| Http Status = 413 | API-Traffic-NOT-Enough |
| Http Status = 415 | API-LOCKED |
| Http Status = 500 | Internal-Server-Error |