OkayAPI Docs
API Params
| Parameter | Type | Required | Default | Note | Description |
|---|---|---|---|---|---|
| HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
| model_name | String | Required | Your table Model Name | ||
| id | Int | Required | MIN: 1 | 数据ID,例如:1,2,3,…… | |
| title | String | Optaion | word文档标题及文件名 | ||
| tpl | String | Optaion | word文档的模板,表单字段点位符为:{{字段名}}。例如:ID为 {{id}},更新时间为{{update_time}},创建时间{{add_time}},特别地,换行为{{\n}}。未设置模板时,默认显示全部字段,一行一个字段 | ||
| font_style | ArrayJSON Format | Optaion | {"name":"Arial"} | word文档的格式设置,JSON格式,示例:{"name": "Microsoft Yahei UI", "size": 20, "color": "#ff6600", "bold": true}格式配置:
|
API Debug
| KEY | REQUIRED | VALUE |
|---|---|---|
| app_key | *Required | |
| model_name | *Required | |
| id | *Required | |
| title | Option | |
| tpl | Option | |
| font_style | Option |
API Response
| KEY | Type | Description |
|---|---|---|
| err_code | Int | 状态操作码,0成功,注意,仅当成功时才可下载word文档,失败时依然以接口JSON结果返回。;1开发类错误,获取失败(符合表字段要求,或表字段不存在);2应用层规则拦截,拦截后可以小白开放平台查看日记;3获取失败(数据已删除或不存在) |
| err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
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 |