@cfygaoyang
2017-08-07T03:49:19.000000Z
字数 1728
阅读 411
APP
GET /product/api/?page=[PAGE]
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
PAGE | 整型 | 否 | 页数 |
{
"meta": {
"code": 0,
"message": "find success"
},
"data": {
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"product_id": "123456",
"product_name": "cao",
"product_type": "1"
},
{
"id": 2,
"product_id": "qwert",
"product_name": "wefgf",
"product_type": "asdf"
}
]
}
}
参数 | 类型 | 说明 |
---|---|---|
code | 整型 | 错误码;0代表正确,反之错误 |
message | 字符串 | 请求提示 |
count | 整型 | 数据总条数 |
next | 字符串 | 下一页的链接 |
previous | 字符串 | 上一页的链接 |
results | 数组 | 数据列表 |
id | 整型 | 产品主键 |
product_id | 字符串 | SDS 产品 product_id |
product_name | 字符串 | 产品名称 |
prodcut_type | 字符串 | 产品类型 |
数据列表一页显示10条
GET /product/api/detail/[ID]
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
ID | 整型 | 是 | 产品主键 |
{
"meta": {
"code": 0,
"message": "find success"
},
"data": {
"id": 1,
"product_id": "123456",
"product_name": "cao",
"product_type": "1"
}
}
参数 | 类型 | 说明 |
---|---|---|
code | 整型 | 错误码;0代表正确,反之错误 |
message | 字符串 | 请求消息提示 |
id | 整型 | 产品主键 |
product_id | 字符串 | SDS 产品 product_id |
product_name | 字符串 | 产品名称 |
product_type | 字符串 | 产品类型 |
GET /product/api/template/detail/[product_id]
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
product_id | 字符串 | 是 | SDS model |
* 请求回调
{
"meta": {
"code": 0,
"message": "find success"
},
"data": {
"id": 1,
"template_name": "dfd",
"template_json": "{\"name\":\"gaoyang\"}",
"template_read": 23,
"product": 1
}
}
参数 | 类型 | 说明 |
---|---|---|
code | 整型 | 错误码;0代表正确,反之错误 |
message | 字符串 | 请求消息提示 |
id | 整型 | 模板主键 id |
template_name | 字符串 | 模板名称 |
template_json | json 字符串 | 下发指令模板 |
template_read | 整型 | 是否可更改;0代表 template_json 只读,反之可编辑 |
product | 整型 | 产品主键 |
GET /product/api/template/[ID]
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
ID | 整型 | 是 | 产品主键 |
{
"meta": {
"code": 0,
"message": "find success"
},
"data": {
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"template_name": "dfd",
"template_json": "123",
"template_read": 23,
"product": 1
}
]
}
}
参数 | 类型 | 说明 |
---|---|---|
code | 整型 | 错误码;0代表正确,反之错误 |
message | 字符串 | 请求提示 |
count | 整型 | 数据总条数 |
next | 字符串 | 下一页的链接 |
previous | 字符串 | 上一页的链接 |
results | 数组 | 数据列表 |
id | 整型 | 模板主键 |
template_name | 字符串 | 模板名称 |
template_json | 字符串json | 下发指令模板 |
template_read | 整型 | 是否可更改;0代表 template_json 只读,反之可编辑 |
product | 整型 | 产品主键 |
数据列表一页显示10条