接收操作指令 websocket测试 POST /devices/<device_sn:str>/ws 接口描述 下发指令操作,为ws连接 请求参数,这里的请求者是服务器! application/json 参数名 类型 描述 必填 参数要求 jsonrpc str JSON-RPC协议版本,必须写为“2.0” 必填 2.0 method str command-reboot或command-getlog 必填 params dict 命令携带的参数 必填 args list[str] 参数值 必填 command str command-reboot或command-getlog 必填 id str 服务端标识id 必填 响应参数,这里的响应者是设备端! application/json 参数名 类型 描述 必填 参数要求 jsonrpc str JSON-RPC协议版本,必须写为“2.0” 必填 2.0 result dict 成功时返回的字典 可选 code int 状态码 必填 200 feedback dict 执行的结果,需要则携带 可选 默认为空dict error dict 失败时返回的字典 可选 code int 状态码 必填 message str 错误的简短描述 必填 data dict 错误附加信息,需要可返回 可选 默认为空dict id str 与请求时对应的客户端标识id 必填 与请求的客户端id一致