@soszrg
2018-05-15T01:56:32.000000Z
字数 13832
阅读 849
V3应用端
所有标明jwt认证的接口,需要在请求header中添加Authorization头域,值为:jwt token,如下示例:
Authorization: jwt eyJhbGciOiJ...
| code | 说明 |
|---|---|
| 10100 | token过期 |
| 10101 | token错误 |
POST /v3/enduser/getVerCode/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| appid | string | 是 | FogCloud后台注册app时生成的id |
| loginname | string | 是 | 注册用的手机号码或者邮箱 |
返回值
{"meta": {"message": "Send message to phone successfully.","code": 0},"data": {}}
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response中的message字段 |
| 10250 | app id无效,在服务器找不到对应app |
| 10050 | 内部错误 |
| 10750 | 未开通阿里大于短信的组件 |
POST /v3/enduser/checkVerCode/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| appid | string | 是 | FogCloud后台注册app时生成的id |
| loginname | string | 是 | 注册用的手机号码或者邮箱 |
| vercode | string | 是 | 验证码 |
返回值
{"meta": {"message": "signup ok","code": 0},"data": {"token": "eyJhbGciOiJIUzI1N...","clientid": "b6d21b047bed11e78d170016..."}}
字段说明
| 返回值字段 | 字段类型 | 字段说明 |
|---|---|---|
| token | string | jwt token |
| clientid | string | 用户在服务器的唯一标识,同enduserid |
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10250 | app id无效,在服务器找不到对应app |
| 10252 | 用户被禁用 |
| 10300 | 验证码过期 |
| 10301 | 验证码错误 |
| 10050 | 服务器内部错误:缺少或者有多个MqttClient |
注意事项
POST /v3/enduser/login/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| loginname | string | 是 | 注册用的手机号码或者邮箱 |
| password | string | 是 | 用户登录密码 |
| appid | string | 是 | FogCloud后台注册app时生成的appid |
| extend | json string | 否 | 扩展字段 |
返回值
{"meta": {"message": "ok","code": 0},"data": {"token": "eyJhbGciOiJIUzI1N...","clientid": "b6d21b047bed11e78d170016..."}}
返回值字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| token | string | JWT token |
| clientid | string | 用户在服务器的唯一标识,同enduserid |
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10250 | 用户不存在 |
| 10251 | 用户密码错误 |
| 10252 | 用户被禁用 |
PUT /v3/enduser/logout/
请求参数
无
返回值
{"meta": {"message": "log out ok","code": 0},"data": {}}
错误码
无
POST /v3/enduser/mqttInfo/
请求参数
无
返回值
{"meta": {"message": "mqtt info","code": 0},"data": {"endpoint": "8d69e5821...""loginname": "8d69e58212cd11e7a...","clientid": "d53azsf...""mqttport": 1883,"password": "iLBZ48jfB6tUBIoS8MS...","mqtthost": "8d69e58212cd11e7...e.com","sslport": 1884}}
返回值字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| endpoint | string | MqttServer实例ID |
| loginname | string | 登录名 |
| clientid | string | 用户在服务器的唯一标识,同enduserid |
| password | string | 登录密码 |
| mqtthost | string | MqttServer实例地址 |
| mqttport | string | 数据非加密端口 |
| sslport | string | 数据加密端口 |
错误码
无
POST /v3/enduser/refreshToken/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| token | string | 是 | jwt token |
返回值
{"meta": {"message": "ok","code": 0},"data": {"token": "eyJhbGciOiJIUzI1N...","clientid": "b6d21b047bed11e78d170016..."}}
返回值字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| token | string | JWT token |
| clientid | string | 终端用户ID,同enduserid。 |
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:缺少参数或者参数类型错误等 |
| 10101 | token错误 |
| 10102 | token已过刷新有效期,无法刷新 |
| 10250 | token对应的用户没找到 |
| 10252 | 用户被禁用 |
POST /v3/enduser/verifyToken/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| token | string | 是 | jwt token |
返回值
{"meta": {"message": "ok","code": 0},"data": {"token": "eyJhbGciOiJIU...","clientid": "2faf79d67cb111e7b..."}}
返回值字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| token | string | JWT token |
| clientid | string | 终端用户ID,同enduserid |
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:缺少参数或者参数类型错误等 |
| 10101 | token错误 |
| 10102 | token已过刷新有效期,无法刷新 |
| 10250 | token对应的用户没找到 |
| 10252 | 用户被禁用 |
POST /v3/enduser/resetPassword/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| password1 | string | 是 | 密码,至少4个字符,最多20个字符 |
| password2 | string | 是 | 确认密码,至少4个字符,最多20个字符 |
返回值
{"meta": {"message": "Update password successfully.","code": 0},"data": {}}
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
POST /v3/enduser/bindDevice/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| deviceid | string | 是 | 设备ID |
| extend | json string | 否 | 扩展字段 |
返回值
{"meta": {"message": "Bind superuser to device successfully.","code": 0},"data": {"deviceid": "7d0d843...","devicename": "test"}}
或者
{"meta": {"message": "Rebind device to this User","code": 0},"data": {"deviceid": "7d0d84...","devicename": "test"}}
返回值字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| deviceid | string | 设备ID |
| devicename | string | 设备名字,默认为产品名字 |
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10200 | 设备ID错误,找不到对应设备 |
| 10300 | App没有跟设备对应的产品建立绑定关系 |
| 10352 | 设备已经绑定超级用户 |
POST /v3/enduser/shareCode/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| deviceid | string | 是 | 设备ID |
| role | int | 是 | 授权级别:2→管理员 3→普通用户 |
| validtimes | int | 否 | 验证码是否一次有效,0为一次有效,非0为十分钟有效 |
返回值
{"meta": {"message": "Generate captcha successfully.","code": 0},"data": {"vercode": "ac137a1e-9cda-11e6-993c-dc536017523b"}}
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10200 | 设备ID错误,找不到对应设备 |
| 10353 | 权限错误:需要管理员或者超级管理员权限 |
POST /v3/enduser/grantDevice/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| vercode | string | 是 | 授权码 |
| deviceid | string | 是 | 设备ID |
| bindingtype | string | 是 | 用户分组,可选值home,guest和other |
| deviceid | string | 是 | 设备ID |
| extend | json string | 否 | 扩展字段 |
返回值
{"meta": {"message": "Grant successfully.","code": 0},"data": {"bindingtype": "home","role": 2,"bindingtime": "2016-10-28T15:41:35.817000","status": 1,"deleteflag": false,"alias": "test","extra": {},"enduser": "afgxrty...","app": "c57a6240-4e...","device": "tywww..."}}
返回值字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| bindingtype | string | 用户属组:home,sa,other,guest四种 |
| role | int | 授权级别 |
| bindingtime | string | 绑定时间 |
| alias | string | 设备名字,默认为产品名字 |
| extra | json string | 扩展属性 |
| app | string | App ID |
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response中的message字段 |
| 10300 | App跟产品没有建立绑定关系 |
| 10200 | 设备ID错误,找不到对应设备 |
| 10400 | 授权码过期 |
| 10401 | 授权码错误 |
| 10050 | 内部错误 |
PUT /v3/enduser/userInfo/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| nickname | string | 否 | 昵称 |
| realname | string | 否 | 实名 |
| gender | string | 否 | 性别 |
| city | string | 否 | 所在城市 |
| avatar | string | 否 | 头像,只能是图片的存储链接 |
| note | string | 否 | 备注 |
| extend | json string | 否 | 扩展字段 |
返回值
{"meta":{"message":"success","code":0},"data":{"nickname":"nickname","realname":"realname","gender":"f","city":"shanghai","avatar":"https://storecloud.com/1.jpg","note":"App User"}}
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
GET /v3/enduser/userInfo/
请求参数
无
返回值
{"meta":{"message":"get user info ok","code":0},"data":{"enduserid":"b6d21b047bed11e...","last_login":"2017-08-09T15:39:32.742454","phone":"","phonearea":"+86","phoneverified":false,"email":"test1231@126.com","emailverified":true,"nickname":"","realname":"","gender":"","city":"","avatar":"","note":"","is_active":true,"date_joined":"2017-08-08T11:57:36.258161","is_virtual":false,"isonline":false,"onlinetimes":0,"open_id":"","app":"2c357408-7730-11e7-8d17-00163e03b4d6"}}
返回值字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| last_login | string | 最后登录时间 |
| enduserid | string | 终端用户ID |
| phone | string | 注册手机号 |
| phonearea | string | 手机号归属地,如“+86”:中国 |
| phoneverified | bool | 手机号认证标识 |
| string | 注册邮箱 | |
| emailverified | bool | 邮箱认证标识 |
| nickname | string | 昵称 |
| realname | string | 实名 |
| gender | string | 性别 |
| city | string | 城市 |
| avatar | string | 头像链接 |
| note | string | 备注 |
| is_active | bool | 是否激活 |
| date_joined | string | 注册时间 |
| is_virtual | bool | 是否为虚拟用户:true为虚拟用户,false非虚拟用户 |
| app | string | App ID |
| open_id | string | 微信用户ID,用于微信用户 |
错误码
无
PUT /v3/enduser/unbindDevice/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| deviceid | string | 是 | 设备ID |
返回值
{"meta":{"message":"Unbind user successfully.","code":0},"data":{}}
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10350 | 用户与设备之间没有绑定关系 |
| 10050 | 内部错误 |
PUT /v3/enduser/removeBindRole/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| deviceid | string | 是 | 设备ID |
| enduserid | string | 是 | 用户ID |
返回值
{"meta":{"message":"Remove successfully.","code":0},"data":{"enduserid":"782127..."}}
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10350 | 用户与设备之间没有绑定关系 |
| 10353 | 需要管理员或者超级用户权限 |
| 10050 | 异常错误 |
POST /v3/enduser/transferAdmin/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| deviceid | string | 是 | 设备ID |
| enduserid | string | 是 | 新超级用户的ID |
返回值
{"meta":{"message":"Transfer superuser successfully.","code":0},"data":{"enduserid":"7821272..."}}
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10200 | 设备ID错误,找不到对应设备 |
| 10250 | 用户ID错误(需要同一个app的用户) |
| 10350 | 用户与设备之间没有绑定关系 |
| 10353 | 需要管理员或者超级用户权限 |
PUT /v3/enduser/updateBindRole/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| deviceid | string | 是 | 设备ID |
| enduserid | string | 是 | 用户ID |
| role | int | 是 | 授权级别,值只能为2或者3 |
返回值
{"meta":{"message":"update ok","code":0},"data":{"enduserid":"78212..."}}
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10200 | 设备ID错误 |
| 10250 | 要更新的用户不存在 |
| 10350 | 用户与设备之间没有绑定关系 |
| 10353 | 需要管理员或者超级用户权限 |
GET /v3/enduser/deviceList/
请求参数
无
返回值
{"meta":{"message":"device list by user","code":0},"data":[{"device_pw":"123456","product_icon":"","gatewaytype":1,"device_name":"test","mac":"123qwe","role":1,"online":false,"product_name":"test","device_id":"7d0d843..."},{"device_pw":"123456","product_icon":"","gatewaytype":1,"device_name":"test","mac":"faagaaffabbb","role":2,"online":true,"product_name":"test","device_id":"471c670..."}]}
返回值字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| device_pw | string | 设备密码 |
| product_icon | string | 产品图标链接 |
| gatewaytype | int | 产品类别标识:0为普通设备,1为网关设备,2为子设备 |
| device_name | string | 设备名字 |
| is_sub | bool | 子设备标识:false为非子设备,true为子设备 |
| mac | string | mac地址 |
| role | int | 授权级别:1为超级用户;2为管理员;3为普通用户 |
| online | bool | 在离线状态:false为离线,true为在线 |
| product_name | string | 产品名字 |
错误码
无
GET /v3/enduser/enduserList/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| deviceid | string | 是 | 设备ID |
返回值
{"meta":{"message":"Get user list successfully.","code":0},"data":[{"realname":"","enduserid":"78212721-759e-11e6-b860-f8cab81d2727","app":"c57a6240-4e6e-11e6-96c8-dc536017523b","is_active":true,"phone":"13026532187","role":2,"nickname":"","email":""},{"realname":"","enduserid":"f2e836cf-57c4-11e6-96bb-f8cab81d2727","app":"c57a6240-4e6e-11e6-96c8-dc536017523b","is_active":true,"phone":"","role":3,"nickname":"","email":"zhangrg@mxchip.com"}]}
返回值字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| enduserid | string | 用户ID |
| app | string | App ID |
| role | int | 授权级别:1为超级用户;2为管理员;3为普通用户 |
| is_active | bool | 用户状态:true为可用,false为禁用 |
| phone | string | 用户注册手机号 |
| string | 用户注册邮箱 | |
| nickname | string | 用户昵称 |
| realname | string | 用户实名 |
错误码
| 错误码 | 说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10353 | 用户不是管理员或者超级用户 |
GET /v3/enduser/deviceInfo/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| deviceid | string | 是 | 设备ID |
返回值
{"meta":{"message":"Device info","code":0},"data":{"productid":"f14125...""gatewaytype":1,"alias":"test","online":false}}
返回值字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| productid | string | 产品ID |
| gatewaytype | int | 产品类别标识:0为普通设备,1为网关设备,2为子设备 |
| alias | string | 设备别名,默认为产品名字 |
| online | bool | 在离线状态:false为离线,true为在线 |
错误码
| 错误码 | 说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10200 | 设备ID错误 |
| 10350 | 用户与设备没有绑定 |
PUT /v3/enduser/updateDeviceAlias/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| deviceid | string | 是 | 设备ID |
| alias | string | 是 | 设备别名,长度限制为100个字符 |
返回值
{"meta":{"message":"Update alias successfully.","code":0},"data":{}}
错误码
| 错误码 | 说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10350 | 用户与设备间没有绑定关系 |
GET /v3/enduser/weather/caiyun/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| begin | int | 是 | 查询时间(整型时间戳) |
| lon | float | 是 | 经度 |
| lat | float | 是 | 纬度 |
错误码
| 错误码 | 说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10050 | 未知问题 |
| 10750 | App未配置彩云天气组件 |
POST /v3/schedule/task/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| device_id | string | 是 | 设备ID |
| task_type | int | 是 | 任务类型: 0→定时任务;1→延时任务 |
| commands | json string | 是 | 需要推送的指令 |
| enable | bool | 是 | 是否开启任务 |
| group_id | string | 否 | 任务组ID |
| day_of_week | string | 否 | 星期(取值参考下面内容) |
| hour | string | 否 | 小时(定时任务必填参数) |
| minute | string | 否 | 分钟(定时任务必填参数) |
| second | int | 否 | 秒(延时任务必填参数,定时任务只精确到分钟) |
说明
[[{"groupid":"abc","task_id":"001","command":"start","day_of_week":"0, 1""hour":"7","minute":"30"},{"groupid":"abc","task_id":"002","command":"stop","day_of_week":"0, 1""hour":"18","minute":"30"}],[{"groupid":"def","task_id":"003","command":"start","day_of_week":"2""hour":"9","minute":"30"},{"groupid":"def","task_id":"004","command":"stop","day_of_week":"2""hour":"17","minute":"30"}]]
day_of_week取值
| 值 | 星期 |
|---|---|
| 0 | 周日 |
| 1 | 周一 |
| 2 | 周二 |
| 3 | 周三 |
| 4 | 周四 |
| 5 | 周五 |
| 6 | 周六 |
| * | 每天 |
说明:如果day_of_week为空字符串[""],或者调用接口时没有传入该参数,则认为该任务是单次任务,执行完就变为disable状态
定时任务示例
{"device_id":"acdeb64e137811...","task_type":1,"commands":"{\"open_light\": true}","enable":true,"day_of_week":"1,3,5","hour":"19","minute":"0"}
延时任务示例
{"device_id":"acdeb64e137811...","task_type":1,"commands":"{\"close_light\": true}","enable":true,"second":60}
返回值
{"meta":{"message":"create task ok.","code":0},"data":{"name":"a1b40530-91...","createtime":"2017-09-04T15:49:51.385"}}
字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| name | string | 任务名称(唯一ID) |
| createtime | string | 创建时间 |
错误码
| 错误码 | 说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10350 | 用户与设备间没有绑定关系 |
GET /v3/schedule/task/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| device_id | string | 是 | 设备ID |
| request_type | int | 是 | 请求类型:1→用户所有任务;2→用户指定任务 |
| task_type | int | 是 | 任务类型: 0→定时任务;1→延时任务 |
| need_group | int | 否 | 是否需要分组显示任务:0→不分组;1→分组 |
| task_name | string | 否 | 任务名(当request_type为2时,该参数必填) |
返回值
{"meta":{"message":"task list","code":0},"data":[{"commands":"{\"open_light\":true}","enable":true,"name":"a1b40530-914...","hour":"19","day_of_week":"*","createtime":"2017-09-04T16:28:30.170","minute":"0"}]}
错误码
| 错误码 | 说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10350 | 用户与设备间没有绑定关系 |
PUT /v3/schedule/task/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| name | string | 是 | 任务名 |
| commands | json string | 是 | 需要推送的指令 |
| enable | bool | 是 | 是否开启任务 |
| month | string | 否 | 月 |
| day_of_month | string | 否 | 日 |
| day_of_week | string | 否 | 星期(取值参加下面内容) |
| hour | string | 否 | 小时(定时任务必填参数) |
| minute | string | 否 | 分钟(定时任务必填参数) |
| second | int | 否 | 秒(延时任务必填参数,定时任务只精确到分钟) |
说明
day_of_week取值
| 值 | 星期 |
|---|---|
| 0 | 周日 |
| 1 | 周一 |
| 2 | 周二 |
| 3 | 周三 |
| 4 | 周四 |
| 5 | 周五 |
| 6 | 周六 |
定时任务示例
{"name":"5de0dbde-afb...","commands":"{\"open_light\": true}","enable":true,"month":"*","day_of_month":"*","day_of_week":"2,4,6","hour":"18","minute":"0"}
延时任务示例
{"device_id":"acdeb64e137811...","task_type":1,"commands":"{\"close_light\": true}","enable":true,"second":100}
返回值
{"meta":{"message":"update task ok.","code":0},"data":{"name":"a1b40530-91..."}}
字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| name | string | 任务名称(唯一ID) |
| createtime | string | 创建时间 |
错误码
| 错误码 | 说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10350 | 用户与设备间没有绑定关系 |
| 11600 | 任务不存在 |
DELETE /v3/schedule/task/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| name | string | 是 | 任务名 |
返回值
{"meta":{"message":"delete task: a1b40530-9... ok.","code":0},"data":{}}
错误码
| 错误码 | 说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10350 | 用户与设备间没有绑定关系 |
| 11600 | 任务不存在 |
POST /v3/enduser/device/tsd/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| deviceid | string | 是 | 设备ID |
| start | string | 是 | 查询起始时间 |
| aggregator | json string | 否 | 聚合查询条件,目前仅支持取平均值 |
| fill | json string | 否 | 取样为空值时的填充值 |
aggregator说明
aggregator为json string,且需要对应start使用,以下是对应的key和value取值。
| 条件 | start | key | value | 说明 |
|---|---|---|---|---|
| 6h | 6 hours ago | Avg | 1 hour | 最近6小时内,每小时的平均值 |
| 12h | 12 hours ago | Avg | 1 hour | 最近12小时内,每小时的平均值 |
| 1天 | 1 day ago | Avg | 1 hour | 最近1天内,每小时的平均值 |
| 1周 | 1 week ago | Avg | 1 day | 最近一周内,每天的平均值 |
aggregator示例
{"name":"Avg""sampling":"1 hour"}
fill说明
fill是当取值为空值时,将该样本的聚合结果填充的值;比如fill设置为:
{"type": "Fixed","interval": "1 hour","value": -1}
三点的数据为空,则三点的数据被填充为-1。
请求的data示例
{"deviceid": "3rfxz...","start":"3 hour ago""aggregator": '{"name":"Avg","sampling":"1 hour"}',"fill":'{"type": "Fixed","interval": "1 hour","value": -1}'}
返回值
{"meta":{"message":"tsd data","code":0},"data":{"count":2,"next":null,"previous":null,"results":[[1526346000,-1],[1526350200,14.666666666666666],[1526353200,5.578418230563003]]}}
错误码
| 错误码 | 说明 |
|---|---|
| 10000 | 参数错误:参考Response的message字段 |
| 10050 | 未知错误 |