飞燕通版WEB接口文档
未分类
API接口请求规则
{
"Content-Type": "application/json",
"Authorization": "Token 1234567890"
}
备注: 1234567890 为 access_token 的值
账号体系
获取Token
POST /admin/auth/access_token/
参数 |
类型 |
必填 |
说明 |
area |
string |
否 |
手机区号 |
account |
string |
是 |
手机或邮箱 |
password |
string |
是 |
密码 |
参数 |
类型 |
必有 |
说明 |
access_token |
string |
是 |
用于请求Header中的Token值 |
refresh_token |
string |
是 |
用于刷新Token信息 |
expires_at |
string |
是 |
access_token有效截止时间 |
expires_in |
string |
是 |
access_token有效时间,单位:秒 |
{
"code": 0,
"message": "success",
"data": {
"access_token": "lRnCFDxpK6PhpT44YaaLMwHmvI97GCIQvxazlNSQC4XxjDBCAV",
"refresh_token": "aQ4XO33CSez6aSXEaiptgD10NzbWMu42xh3Wvb3YI2pgpD1raD",
"expires_at": "2019-05-29 18:22:30",
"expires_in": 604800
}
}
刷新Token
POST /admin/auth/refresh_token/
参数 |
类型 |
必填 |
说明 |
refresh_token |
string |
是 |
刷新Token |
参数 |
类型 |
必有 |
说明 |
access_token |
string |
是 |
用于请求Header中的Token值 |
refresh_token |
string |
是 |
用于刷新Token信息 |
expires_at |
string |
是 |
access_token有效截止时间 |
expires_in |
string |
是 |
access_token有效时间,单位:秒 |
{
"code": 0,
"message": "success",
"data": {
"access_token": "lRnCFDxpK6PhpT44YaaLMwHmvI97GCIQvxazlNSQC4XxjDBCAV",
"refresh_token": "aQ4XO33CSez6aSXEaiptgD10NzbWMu42xh3Wvb3YI2pgpD1raD",
"expires_at": "2019-05-29 18:22:30",
"expires_in": 604800
}
}
销毁Token
POST /admin/auth/destroy_token/
{
"code": 0,
"message": "success",
"data": {}
}
获取个人信息
GET /admin/personal/info/
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
用户ID |
area |
string |
是 |
手机区号 |
phone |
string |
是 |
手机号 |
email |
string |
是 |
邮箱 |
role |
int |
是 |
用户角色,0:普通用户 |
username |
string |
是 |
用户名 |
is_active |
bool |
是 |
是否已激活 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
nickname |
string |
是 |
昵称 |
avatar |
string |
是 |
头像地址 |
gender |
int |
是 |
性别,0:女,1:男,2:保密 |
birthday |
string |
是 |
生日日期,如:2019-02-22 |
address |
string |
是 |
地址 |
{
"code": 0,
"message": "success",
"data": {
"id": 8,
"area": "86",
"phone": "18656660930",
"email": "",
"open_id": "HuTfdXc8mENtNULFPBVt233cN2gzZ9lKqAcoUKed",
"role": 0,
"username": "18656660930",
"is_active": true,
"app_id": "",
"created_at": "2019-05-22 18:20:45",
"updated_at": "2019-05-22 18:20:45",
"nickname": "",
"avatar": "",
"gender": 2,
"birthday": "",
"address": ""
}
}
编辑个人信息
PUT /admin/personal/info/
参数 |
类型 |
必填 |
说明 |
nickname |
string |
否 |
昵称 |
avatar |
string |
否 |
头像地址 |
gender |
int |
否 |
性别:0女,1男,2保密 |
birthday |
string |
否 |
生日: 格式要求示例(1991-03-08) |
address |
string |
否 |
住址 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
用户ID |
area |
string |
是 |
手机区号 |
phone |
string |
是 |
手机号 |
email |
string |
是 |
邮箱 |
role |
int |
是 |
用户角色,0:普通用户 |
username |
string |
是 |
用户名 |
is_active |
bool |
是 |
是否已激活 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
nickname |
string |
是 |
昵称 |
avatar |
string |
是 |
头像地址 |
gender |
int |
是 |
性别,0:女,1:男,2:保密 |
birthday |
string |
是 |
生日日期,如:2019-02-22 |
address |
string |
是 |
地址 |
{
"code": 0,
"message": "success",
"data": {
"id": 8,
"area": "86",
"phone": "18656660930",
"email": "",
"open_id": "HuTfdXc8mENtNULFPBVt233cN2gzZ9lKqAcoUKed",
"role": 0,
"username": "18656660930",
"is_active": true,
"app_id": "",
"created_at": "2019-05-22 18:20:45",
"updated_at": "2019-05-22 18:20:45",
"nickname": "",
"avatar": "",
"gender": 2,
"birthday": "",
"address": ""
}
}
FAQ服务
添加FAQ
POST /admin/faq/
参数 |
类型 |
必填 |
说明 |
title |
string |
是 |
标题 |
content |
string |
是 |
内容 |
category |
string |
否 |
类型 |
external_link |
string |
否 |
外链 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
faq信息id |
title |
string |
是 |
标题 |
content |
string |
是 |
内容 |
category |
string |
是 |
类型 |
external_link |
string |
是 |
外链 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
{
"code": 0,
"message": "success",
"data": {
"id": 2,
"app_id": "",
"created_at": "2019-05-23 18:17:16",
"updated_at": "2019-05-23 18:17:16",
"title": "标题",
"content": "内容",
"category": "",
"external_link": ""
}
}
编辑FAQ
PUT /admin/faq/{id}/
参数 |
类型 |
必填 |
说明 |
id |
int |
是 |
faq信息id |
title |
string |
是 |
标题 |
content |
string |
是 |
内容 |
category |
string |
否 |
类型 |
external_link |
string |
否 |
外链 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
faq信息id |
title |
string |
是 |
标题 |
content |
string |
是 |
内容 |
category |
string |
是 |
类型 |
external_link |
string |
是 |
外链 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
{
"code": 0,
"message": "success",
"data": {
"id": 2,
"app_id": "",
"created_at": "2019-05-23 18:17:16",
"updated_at": "2019-05-23 18:17:16",
"title": "标题",
"content": "内容",
"category": "",
"external_link": ""
}
}
删除FAQ
DELETE /admin/faq/{id}/
参数 |
类型 |
必填 |
说明 |
id |
int |
是 |
faq信息id |
{
"code": 0,
"message": "success",
"data": {}
}
获取FAQ详情
GET /admin/faq/{id}/
参数 |
类型 |
必填 |
说明 |
id |
int |
是 |
faq信息id |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
faq信息id |
title |
string |
是 |
标题 |
content |
string |
是 |
内容 |
category |
string |
是 |
类型 |
external_link |
string |
是 |
外链 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
{
"code": 0,
"message": "success",
"data": {
"id": 2,
"app_id": "",
"created_at": "2019-05-23 18:17:16",
"updated_at": "2019-05-23 18:17:16",
"title": "标题",
"content": "内容",
"category": "",
"external_link": ""
}
}
获取FAQ列表
GET /admin/faq/
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
faq信息id |
title |
string |
是 |
标题 |
content |
string |
是 |
内容 |
category |
string |
是 |
类型 |
external_link |
string |
是 |
外链 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
{
"code": 0,
"message": "success",
"data": {
"total": 1,
"pages": 1,
"current_page": 1,
"page_size": 20,
"data": [
{
"id": 2,
"app_id": "",
"created_at": "2019-05-23 18:17:16",
"updated_at": "2019-05-23 18:17:16",
"title": "标题",
"content": "内容",
"category": "",
"external_link": ""
}
]
}
}
意见反馈
添加反馈类型
POST /admin/feedback_category/
参数 |
类型 |
必填 |
说明 |
name |
string |
是 |
名称 |
description |
string |
否 |
描述 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
反馈类型id |
name |
string |
是 |
反馈类型名称 |
description |
string |
是 |
反馈类型描述 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
{
"code": 0,
"message": "success",
"data": {
"id": 2,
"app_id": "",
"created_at": "2019-05-24 11:28:43",
"updated_at": "2019-05-24 11:28:43",
"name": "设备",
"description": "其他"
}
}
编辑反馈类型
PUT /admin/feedback_category/{id}/
参数 |
类型 |
必填 |
说明 |
id |
int |
是 |
反馈类型id |
name |
string |
是 |
名称 |
description |
string |
否 |
描述 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
反馈类型id |
name |
string |
是 |
反馈类型名称 |
description |
string |
是 |
反馈类型描述 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
{
"code": 0,
"message": "success",
"data": {
"id": 2,
"app_id": "",
"created_at": "2019-05-24 11:28:43",
"updated_at": "2019-05-24 11:28:43",
"name": "设备",
"description": "其他"
}
}
删除反馈类型
DELETE /admin/feedback_category/{id}/
参数 |
类型 |
必填 |
说明 |
id |
int |
是 |
反馈类型id |
{
"code": 0,
"message": "success",
"data": {}
}
获取反馈类型详情
GET /admin/feedback_category/{id}/
参数 |
类型 |
必填 |
说明 |
id |
int |
是 |
反馈类型id |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
反馈类型id |
name |
string |
是 |
反馈类型名称 |
description |
string |
是 |
反馈类型描述 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
{
"code": 0,
"message": "success",
"data": {
"id": 2,
"app_id": "",
"created_at": "2019-05-24 11:28:43",
"updated_at": "2019-05-24 11:28:43",
"name": "设备",
"description": "其他"
}
}
获取反馈类型列表
GET /admin/feedback_category/
{
"Content-Type": "application/json; charset=utf-8",
"Authorization": "Token xxxxxx"
}
参数 |
类型 |
必填 |
说明 |
page_no |
int |
否 |
分页数:默认1 |
page_size |
int |
否 |
数据量:默认20 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
反馈类型id |
name |
string |
是 |
反馈类型名称 |
description |
string |
是 |
反馈类型描述 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
{
"code": 0,
"message": "success",
"data": {
"total": 1,
"pages": 1,
"current_page": 1,
"page_size": 20,
"data": [
{
"id": 1,
"app_id": "",
"created_at": "2019-05-24 11:28:08",
"updated_at": "2019-05-24 11:30:57",
"name": "app",
"description": "app"
}
]
}
}
获取意见反馈列表
GET /admin/feedback/
参数 |
类型 |
必填 |
说明 |
page_no |
int |
否 |
分页数:默认1 |
page_size |
int |
否 |
数据量:默认20 |
start_time |
int |
否 |
起始时间戳 |
end_time |
int |
否 |
结束时间戳 |
username |
string |
否 |
用户名 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
反馈类型id |
name |
string |
是 |
反馈类型名称 |
description |
string |
是 |
反馈类型描述 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
{
"code": 0,
"message": "success",
"data": {
"total": 2,
"pages": 1,
"current_page": 1,
"page_size": 20,
"data": [
{
"id": 3,
"app_id": "",
"created_at": "2019-05-24 11:48:47",
"updated_at": "2019-05-24 11:48:47",
"feedback_content": "反馈内容",
"feedback_status": 0,
"feedback_category_id": 1,
"contact_phone": "18656660930",
"user_id": 2,
"username": "admin"
},
{
"id": 2,
"app_id": "",
"created_at": "2019-05-24 11:47:43",
"updated_at": "2019-05-24 11:47:43",
"feedback_content": "反馈内容",
"feedback_status": 1,
"feedback_category_id": 1,
"contact_phone": "18656660930",
"user_id": 2,
"username": "admin"
}
]
}
}
删除意见反馈
DELETE /admin/feedback/{id}/
参数 |
类型 |
必填 |
说明 |
id |
int |
是 |
反馈意见id |
{
"code": 0,
"message": "success",
"data": {}
}
获取意见反馈回复内容
GET /admin/feedback/reply/{feedback_id}/
参数 |
类型 |
必填 |
说明 |
feedback_id |
int |
是 |
反馈意见id |
参数 |
类型 |
必有 |
说明 |
id |
string |
是 |
反馈类型id |
reply_content |
string |
是 |
回复内容 |
is_read |
bool |
是 |
是否已读 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
{
"code": 0,
"message": "success",
"data": {
"id": 2,
"app_id": "",
"created_at": "2019-05-24 14:02:44",
"updated_at": "2019-05-24 14:02:44",
"reply_content": "回复内容",
"manager_id": 2,
"feedback_id": 3,
"is_read": false
}
}
在线文档
创建在线文档
POST /admin/document/
参数 |
类型 |
必填 |
说明 |
doc_name |
string |
是 |
文档名称 |
doc_content |
string |
是 |
文档内容 |
path_name |
string |
是 |
路径名称 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
文档id |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
doc_name |
string |
是 |
文档名称 |
doc_content |
string |
是 |
文档内容 |
doc_url |
string |
是 |
文档地址 |
{
"code": 0,
"message": "success",
"data": {
"id": 1,
"path_name": "1",
"app_id": "",
"created_at": "2019-08-27 16:14:46",
"updated_at": "2019-08-27 16:14:46",
"doc_name": "使用说明书",
"doc_content": "**************",
"doc_url": "http://39.105.60.207:8101/document/1"
}
}
获取文档列表
GET /admin/document/
参数 |
类型 |
必填 |
说明 |
page_no |
int |
否 |
分页数:默认1 |
page_size |
int |
否 |
数据量:默认20 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
文档id |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
doc_name |
string |
是 |
文档名称 |
doc_content |
string |
是 |
文档内容 |
doc_url |
string |
是 |
文档地址 |
{
"code": 0,
"message": "success",
"data": {
"total": 1,
"pages": 1,
"current_page": 1,
"page_size": 20,
"data": [
{
"id": 1,
"path_name": "1",
"app_id": "",
"created_at": "2019-08-27 16:14:46",
"updated_at": "2019-08-27 16:14:46",
"doc_name": "使用说明书",
"doc_content": "**************",
"doc_url": "http://39.105.60.207:8101/document/1"
}
]
}
}
编辑在线文档
PUT /admin/document/[id]/
参数 |
类型 |
必填 |
说明 |
id |
int |
是 |
文档id |
doc_name |
string |
是 |
文档名称 |
doc_content |
string |
是 |
文档内容 |
path_name |
string |
是 |
路径名称 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
文档id |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
doc_name |
string |
是 |
文档名称 |
doc_content |
string |
是 |
文档内容 |
doc_url |
string |
是 |
文档地址 |
{
"code": 0,
"message": "success",
"data": {
"id": 1,
"path_name": "1",
"app_id": "",
"created_at": "2019-08-27 16:14:46",
"updated_at": "2019-08-27 16:14:46",
"doc_name": "使用说明书",
"doc_content": "**************",
"doc_url": "http://39.105.60.207:8101/document/1"
}
}
编辑在线文档
DELETE /admin/document/[id]/
参数 |
类型 |
必填 |
说明 |
id |
int |
是 |
文档id |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
文档id |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
doc_name |
string |
是 |
文档名称 |
doc_content |
string |
是 |
文档内容 |
doc_url |
string |
是 |
文档地址 |
{
"code": 0,
"message": "success",
"data": {}
}
在线文档详情
GET /admin/document/[id]/
参数 |
类型 |
必填 |
说明 |
id |
int |
是 |
文档id |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
文档id |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
app_id |
string |
是 |
厂商标识 |
doc_name |
string |
是 |
文档名称 |
doc_content |
string |
是 |
文档内容 |
doc_url |
string |
是 |
文档地址 |
{
"code": 0,
"message": "success",
"data": {
"id": 1,
"path_name": "1",
"app_id": "",
"created_at": "2019-08-27 16:14:46",
"updated_at": "2019-08-27 16:14:46",
"doc_name": "使用说明书",
"doc_content": "**************",
"doc_url": "http://39.105.60.207:8101/document/1"
}
}
角色管理
获取角色配置清单
GET /admin/config/roles/
参数 |
类型 |
必有 |
说明 |
title |
string |
是 |
菜单名称 |
key |
string |
是 |
菜单唯一标识 |
{
"code": 0,
"message": "success",
"data": {
"roles": [
{
"title": "系统管理",
"key": "1",
"children": [
{
"title": "账号管理",
"key": "1-1"
},
{
"title": "角色管理",
"key": "1-2"
},
{
"title": "日志管理",
"key": "1-3"
}
]
},
{
"title": "配置管理",
"key": "2",
"children": [
{
"title": "在线文档",
"key": "2-1"
},
{
"title": "FAQ",
"key": "1-2"
}
]
},
{
"title": "MQTT服务",
"key": "3",
"children": [
{
"title": "产品管理",
"key": "3-1"
},
{
"title": "设备管理",
"key": "3-2"
}
]
}
]
}
}
获取角色列表
GET /admin/role/
参数 |
类型 |
必填 |
说明 |
page_no |
int |
否 |
分页数:默认1 |
page_size |
int |
否 |
数据量:默认20 |
参数 |
类型 |
必有 |
说明 |
id |
string |
是 |
数据id |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
设备名称 |
role_name |
string |
是 |
角色名称 |
role_permissions |
list |
是 |
角色权限 |
{
"code": 0,
"message": "success",
"data": {
"id": 1,
"role_permissions": [
"1-1",
"2-2"
],
"app_id": "",
"created_at": "2019-09-01 14:28:56",
"updated_at": "2019-09-01 15:04:22",
"role_name": "技术人员"
}
}
创建角色
POST /admin/role/
参数 |
类型 |
必填 |
说明 |
role_name |
string |
是 |
角色名称 |
role_permissions |
list |
是 |
角色权限, 参考角色配置清单,选中的children中的key列表 |
参数 |
类型 |
必有 |
说明 |
id |
string |
是 |
数据id |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
设备名称 |
role_name |
string |
是 |
角色名称 |
role_permissions |
list |
是 |
角色权限 |
{
"role_name": "技术人员",
"role_permissions": ['1-1', '2-2']
}
{
"code": 0,
"message": "success",
"data": {
"id": 1,
"role_permissions": [
"1-1",
"2-2"
],
"app_id": "",
"created_at": "2019-09-01 14:28:56",
"updated_at": "2019-09-01 14:28:56",
"role_name": "技术人员"
}
}
获取角色详情
GET /admin/role/[id]/
参数 |
类型 |
必有 |
说明 |
id |
string |
是 |
数据id |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
设备名称 |
role_name |
string |
是 |
角色名称 |
role_permissions |
list |
是 |
角色权限 |
{
"code": 0,
"message": "success",
"data": {
"id": 1,
"role_permissions": [
"1-1",
"2-2"
],
"app_id": "",
"created_at": "2019-09-01 14:28:56",
"updated_at": "2019-09-01 14:28:56",
"role_name": "技术人员"
}
}
编辑角色
PUT /admin/role/[id]/
参数 |
类型 |
必填 |
说明 |
role_name |
string |
是 |
角色名称 |
role_permissions |
list |
是 |
角色权限, 参考角色配置清单,选中的children中的key列表 |
参数 |
类型 |
必有 |
说明 |
id |
string |
是 |
数据id |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
设备名称 |
role_name |
string |
是 |
角色名称 |
role_permissions |
list |
是 |
角色权限 |
{
"role_name": "技术人员",
"role_permissions": ['1-1', '2-2']
}
{
"code": 0,
"message": "success",
"data": {
"id": 1,
"role_permissions": [
"1-1",
"2-2"
],
"app_id": "",
"created_at": "2019-09-01 14:28:56",
"updated_at": "2019-09-01 14:28:56",
"role_name": "技术人员"
}
}
删除角色
DELETE /admin/role/[id]/
参数 |
类型 |
必填 |
说明 |
id |
string |
是 |
角色id |
{
"code": 0,
"message": "success",
"data": {}
}
公司管理
添加公司
POST /admin/app/
参数 |
类型 |
必填 |
说明 |
company |
string |
是 |
公司名称 |
address |
string |
是 |
公司地址 |
contact_name |
string |
是 |
联系人 |
phone |
string |
是 |
电话 |
email |
string |
否 |
邮箱 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
公司信息id |
company |
string |
是 |
公司名称 |
address |
string |
是 |
公司地址 |
contact_name |
string |
是 |
联系人 |
phone |
string |
是 |
电话 |
email |
string |
是 |
邮箱 |
app_id |
string |
是 |
公司信息标识符 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
{
"code": 0,
"message": "success",
"data": {
"id": 3,
"app_id": "5d73209e228c90634547aaf5",
"created_at": "2019-09-07 11:14:38",
"updated_at": "2019-09-07 11:14:38",
"company": "上海xxxx科技有限公司",
"contact_name": "xxx",
"address": "",
"phone": "18656660932",
"email": ""
}
}
获取公司列表
GET /admin/app/
参数 |
类型 |
必填 |
说明 |
page_no |
int |
否 |
分页数:默认1 |
page_size |
int |
否 |
数据量:默认20 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
公司信息id |
company |
string |
是 |
公司名称 |
address |
string |
是 |
公司地址 |
contact_name |
string |
是 |
联系人 |
phone |
string |
是 |
电话 |
email |
string |
是 |
邮箱 |
app_id |
string |
是 |
公司信息标识符 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
{
"code": 0,
"message": "success",
"data": {
"total": 2,
"pages": 1,
"current_page": 1,
"page_size": 20,
"data": [
{
"id": 3,
"app_id": "5d73209e228c90634547aaf5",
"created_at": "2019-09-07 11:14:38",
"updated_at": "2019-09-07 11:14:38",
"company": "上海xxx",
"contact_name": "xxx",
"address": "",
"phone": "1865666xxxx",
"email": ""
},
{
"id": 2,
"app_id": "5d73205d228c90634547aaf4",
"created_at": "2019-09-07 11:13:33",
"updated_at": "2019-09-07 11:13:33",
"company": "上海xxxx科技有限公司",
"contact_name": "xxx",
"address": "",
"phone": "18656660931",
"email": ""
}
]
}
}
编辑公司
PUT /admin/app/[id]/
参数 |
类型 |
必填 |
说明 |
company |
string |
是 |
公司名称 |
contact_name |
string |
是 |
联系人 |
phone |
string |
是 |
电话 |
email |
string |
否 |
邮箱 |
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
公司信息id |
company |
string |
是 |
公司名称 |
address |
string |
是 |
公司地址 |
contact_name |
string |
是 |
联系人 |
phone |
string |
是 |
电话 |
email |
string |
是 |
邮箱 |
app_id |
string |
是 |
公司信息标识符 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
{
"code": 0,
"message": "success",
"data": {
"id": 3,
"app_id": "5d73209e228c90634547aaf5",
"created_at": "2019-09-07 11:14:38",
"updated_at": "2019-09-07 11:14:38",
"company": "上海xxxx科技有限公司",
"contact_name": "高杨",
"address": "",
"phone": "18656660932",
"email": ""
}
}
获取公司详情
GET /admin/app/[id]/
参数 |
类型 |
必有 |
说明 |
id |
int |
是 |
公司信息id |
company |
string |
是 |
公司名称 |
address |
string |
是 |
公司地址 |
contact_name |
string |
是 |
联系人 |
phone |
string |
是 |
电话 |
email |
string |
是 |
邮箱 |
app_id |
string |
是 |
公司信息标识符 |
created_at |
string |
是 |
创建时间 |
updated_at |
string |
是 |
更新时间 |
{
"code": 0,
"message": "success",
"data": {
"id": 3,
"app_id": "5d73209e228c90634547aaf5",
"created_at": "2019-09-07 11:14:38",
"updated_at": "2019-09-07 11:14:38",
"company": "上海xxxx科技有限公司",
"contact_name": "高杨",
"address": "",
"phone": "18656660932",
"email": ""
}
}
产品管理
添加产品
POST /admin/product/
参数 |
类型 |
必填 |
说明 |
product_name |
字符串 |
是 |
产品名称 |
参数 |
类型 |
必有 |
说明 |
product_name |
字符串 |
是 |
产品名称 |
product_key |
字符串 |
是 |
产品标识符 |
product_secret |
字符串 |
是 |
产品秘钥 |
created |
字符串 |
是 |
创建时间 |
{
"code": 0,
"message": "success",
"data": {
"_id": "5d7609dfe1508d2dfb31c91c",
"product_name": "小系统",
"product_key": "bOZVf6DNvE",
"product_secret": "JvSTO0JQz3oBVIWMFwSU7lK8Eo2vmpsA",
"created": "2019-09-09 16:14:23"
}
}
获取产品列表
GET /admin/product/
参数 |
类型 |
必有 |
说明 |
product_name |
字符串 |
是 |
产品名称 |
product_key |
字符串 |
是 |
产品标识符 |
product_secret |
字符串 |
是 |
产品秘钥 |
created |
字符串 |
是 |
创建时间 |
{
"code": 0,
"message": "success",
"data": {
"total": 2,
"pages": 1,
"current_page": 1,
"page_size": 20,
"data": [
{
"_id": "5d6f719ecb25ac82f5103fc9",
"product_name": "test",
"product_key": "hnbSRfI21N",
"product_secret": "WJ1HHwVhixisjyeCR5hGTH6iVk1gele2",
"created": "2019-09-04 16:11:10"
},
{
"_id": "5d7609dfe1508d2dfb31c91c",
"product_name": "小系统",
"product_key": "bOZVf6DNvE",
"product_secret": "JvSTO0JQz3oBVIWMFwSU7lK8Eo2vmpsA",
"created": "2019-09-09 16:14:23"
}
]
}
}
获取产品详情
GET /admin/product/[product_key]/
参数 |
类型 |
必填 |
说明 |
product_key |
字符串 |
是 |
产品标识符 |
参数 |
类型 |
必有 |
说明 |
product_name |
字符串 |
是 |
产品名称 |
product_key |
字符串 |
是 |
产品标识符 |
product_secret |
字符串 |
是 |
产品秘钥 |
created |
字符串 |
是 |
创建时间 |
{
"code": 0,
"message": "success",
"data": {
"_id": "5d7609dfe1508d2dfb31c91c",
"product_name": "小系统",
"product_key": "bOZVf6DNvE",
"product_secret": "JvSTO0JQz3oBVIWMFwSU7lK8Eo2vmpsA",
"created": "2019-09-09 16:14:23"
}
}
编辑产品详情
PUT /admin/product/[product_key]/
参数 |
类型 |
必填 |
说明 |
product_key |
字符串 |
是 |
产品标识符 |
product_name |
字符串 |
是 |
产品名称 |
参数 |
类型 |
必有 |
说明 |
product_name |
字符串 |
是 |
产品名称 |
product_key |
字符串 |
是 |
产品标识符 |
product_secret |
字符串 |
是 |
产品秘钥 |
created |
字符串 |
是 |
创建时间 |
{
"code": 0,
"message": "success",
"data": {
"_id": "5d7609dfe1508d2dfb31c91c",
"product_name": "小系统",
"product_key": "bOZVf6DNvE",
"product_secret": "JvSTO0JQz3oBVIWMFwSU7lK8Eo2vmpsA",
"created": "2019-09-09 16:14:23"
}
}
删除产品
DELETE /admin/product/[product_key]/
参数 |
类型 |
必填 |
说明 |
product_key |
字符串 |
是 |
产品标识符 |
{
"code": 0,
"message": "success",
"data": {}
}