更新设备的状态以反映当前状态。 该状态是瞬态的,因此它会覆盖最后记录的状态。
网址:
发布 http://api.aurelon.com/api/v2/device/status
请求标头:
内容类型:应用程序/json
MisKey:见认证
HardwareHash:见认证
序列号:见认证
应用程序版本:请参阅身份验证
请求正文:
JSON 对象包含:
- DeviceGUID – 必需的字符串 – 设备 GUID
- 状态– 必需的字符串 – “错误”、“空闲”、“离线”、“打印”、“中止”、“睡眠”、“校准”之一
- 消息– 字符串 – 自由形式的人类可读状态消息
- 温度– 数字 – 以摄氏度为单位的加热器温度
- ConnectionState – 字符串 – 来自 PING 消息的状态,“在线”、“离线”、“不稳定”之一
- ConnectionMessage – 字符串 – 自由形式的人类可读连接状态消息
- RemainingInks – 对象数组 – 每种墨水包含的对象:
- InkIndex – 必填数字 – 墨水的序号
- InkName – 必填字符串 – 墨水颜色的名称
- 液位– 所需数量 – 油箱的当前毫升数,< 0 表示未知
- MaxLevel – 所需数量 – 罐的最大毫升数
- QueueLength – 必需对象 – 包含以下内容之一:
- 长度– 数量 – 卷对卷设备的作业长度(以单位为单位)
- 面积– 数量 – 刚性设备的单位面积作业面积
- 张数 –单张纸设备的张数
例子:
{ "DeviceGUID": "af4da7ba-23be-11e5-850d-f3773dfc73c9", "Status": "Sleeping", "Message": "", "ConnectionState": "Unstable", "ConnectionState": "The connection with the printer is not stable.", "Temperature": 30, "RemainingInks": [ { "InkName": "Magenta", "Level": 606, "MaxLevel": 775 }, { "InkName": "Light magenta", "Level": 624, "MaxLevel": 775 }, { "InkName": "Light cyan", "Level": 661, "MaxLevel": 775 }, { "InkName": "Cyan", "Level": 565, "MaxLevel": 775 }, { "InkName": "Latex Optimizer", "Level": 668, "MaxLevel": 775 }, { "InkName": "Yellow", "Level": 575, "MaxLevel": 775 }, { "InkName": "Black", "Level": 589, "MaxLevel": 775 }, { "InkName": "CleanKit", "Level": 75, "MaxLevel": 100 } ] }
回复:
包含操作结果的内容类型 application/json。
成功:
200 OK : “设备状态更新成功”
错误:
- 401 Unauthorized : {“Message”:”Invalid HardwareHash”}
- 401 Unauthorized : {“Message”: “Invalid MisKey”}
- 404 未找到: {“消息”:“未找到 DeviceGUID”}
- 401 Unauthorized : {“Message”: “”MisKey” or “HardwareHash”, “SerialNumber” and “ApplicationVersion” header are required”}
- 400 错误请求: {“Message”: “DeviceGUID” value required”}
- 500 内部服务器错误: {“消息”:“内部服务器错误”}