登陆管理 #
l http接口要支持多地点同时登陆
目前系统只支持单点登录,不支持多地点,单点登录接口如下:
获取登录验证码 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api//stage-api/captchaImage | |
method | GET | |
header | 无需设置 | |
url 参数说明 | ||
body | ||
return | 失败 {“img”: null,”code”: 404, “msg”: “”} 成功 { “msg”: “操作成功”, “img”: “/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAA8AKADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtrW1ga1hZoIySikkoOeKsCztv+feL/vgU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cf87”} |
登陆接口 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api/login | |
method | POST | |
header | 无需设置 | |
url 参数说明 | – | |
body | { “username”: “admin”, “password”: “A…6”, “code”: “6”, “uuid”: “373bbc1a6ded46b2a723bc02d618a210”} | // 用户名// 密码// 验证码code// 验证码接口返回的uuid |
return | 失败 { “msg”: “验证码错误”, “code”: 500}成功 { “msg”: “操作成功”, “code”: 200, “token”: “eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImY2ZjVmZDZkLWUzYjAtNDM4OC1hMjZiLWQ2NmMyMGY4YWFlOSJ9.RRS_MMUOFNFhz1TdPTqJEMMuRgWJUFv9hfZFDbDcChKttlXgMgl-uF_1BFG82pUeQxErp9Hny0oIWo22GbJAsw”} |
查看用户详细信息 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api/getInfo | |
method | GET | |
header | Authorization:Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA Cookie:username=admin; password=RctI2NgdNjPXbUlKfdmWljCdH+2lDMpjQXLA7Ubam1rd2256efuh8Gmo1tQZdu21CFpbBeXYDzl1iJASFJ+u0Q==; rememberMe=true; Admin-Token=eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA | |
url 参数说明 | ||
body | ||
return | 失败 {“rows”: null,”code”: 200, “msg”: “查询成功”}成功 { “msg”: “操作成功”, “code”: 200, “permissions”: [ “*:*:*” ], “roles”: [ “admin” ], “user”: { “createBy”: “admin”, “createTime”: “2023-01-13 15:40:09”, “updateBy”: null, “updateTime”: null, “remark”: “管理员”, “userId”: 111, “deptId”: 1113, “userName”: “admin”, “nickName”: “超级管理员”, “email”: “123@modbus.net”, “phonenumber”: “123”, “sex”: “0”, “avatar”: “/profile/avatar/2024/04/08/blob_2021240408120730A001.png”, “password”: “$2a$10$/gHpS2Lf3KQAAyX45HrlxLQYOMYhin7Kz3Bq39bnuK1lS/o2EtLchN6u”, “status”: “0”, “delFlag”: “0”, “loginIp”: “127.0.0.1”, “loginDate”: “2024-04-12T17:35:16.000+08:00”, “dept”: { “createBy”: null, “createTime”: null, “updateBy”: null, “updateTime”: null, “remark”: null, “deptId”: 103, “parentId”: 101, “ancestors”: “0,100,101”, “deptName”: “研发部门”, “orderNum”: 1, “leader”: “”, “phone”: null, “email”: null, “status”: “0”, “delFlag”: null, “parentName”: null, “children”: [] }, “roles”: [], “roleIds”: null, “postIds”: null, “roleId”: null, “voiceNum”: 10001, “smsNum”: 10010, “deviceNum”: 300100, “historyNum”: 10010000, “protocal”: “1,2,3,7,8,9,10”, “logintitle”: “Modbus物联网平台”, “loginfonter”: “Modbus物联网平台 1.0”, “loginimg”: “/stage-api/profile/upload/2023/03/30/blob_20230330171859A001.png”, “ifcomp”: “1”, “unionId”: null, “openId”: null, “admin”: true }} |
项目管理 #
查看批量项目数据 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api/appManage/list?user_id=1&pageNum=1&pageSize=10&name= | |
method | GET | |
header | Authorization:Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA Cookie:username=admin; password=RctI2NgdNjPXbUlKfdmWljCdH+2lDMpjQXLA7Ubam1rd2256efuh8Gmo1tQZdu21CFpbBeXYDzl1iJASFJ+u0Q==; rememberMe=true; Admin-Token=eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA | |
url 参数说明 | name:项目名称 pageNum:第几页 pageSize:每页条数 user_id:用户ID | |
body | ||
return | 失败 {“rows”: null,”code”: 200, “msg”: “查询成功”}成功 { “total”: 1, “rows”: [ { “user_id”: 585, “id”: 249, “delete_flag”: 0, “name”: “龙宫控制系统”, “lon”: 118.085112, “lat”: 27.367621, “description”: “福建省”, “atime”: “2023-09-01T22:18:32.000+08:00”, “address”: “” } ], “code”: 200, “msg”: “查询成功”} |
设备管理 #
查看批量设备数据 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api/device/gatewayManager/list?scene_id=249&groupid=4&name=%E7%8E%AF%E5%A2%83%E6%A3%80%E6%B5%8B&pageNum=1&pageSize=10 | |
method | GET | |
header | Authorization:Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA Cookie:username=admin; password=RctI2NgdNjPXbUlKfdmWljCdH+2lDMpjQXLA7Ubam1rd2256efuh8Gmo1tQZdu21CFpbBeXYDzl1iJASFJ+u0Q==; rememberMe=true; Admin-Token=eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA | |
url 参数说明 | name:设备名称 pageNum:第几页 pageSize:每页条数 scene_id:项目ID groupid:分组ID | |
body | ||
return | 失败 {“rows”: null,”code”: 200, “msg”: “查询成功”} 成功 { “total”: 1, “rows”: [ { “scene_id”: 249, “id”: 274, “delete_flag”: 0, “name”: “环境检测”, “device_code”: “TuCjk0F”, “iot_protocal_category”: “ProtocalModbus”, “iot_node_status”: 18, “atime”: “2023-09-01T22:20:30.000+08:00”, “mtime”: “2024-04-10T14:44:10.000+08:00”, “maintenance_time”: “2023-09-13T23:01:00.000+08:00”, “lonLat”: “118.085138,27.367664”, “infos”: “[{\”address\”:\”1\”,\”fcode\”:\”01\”,\”saddr\”:\”1\”,\”length\”:\”1\”},{\”address\”:\”2\”,\”fcode\”:\”05\”,\”saddr\”:\”2\”,\”length\”:\”2\”},{\”address\”:\”3\”,\”fcode\”:\”01\”,\”saddr\”:\”1\”,\”length\”:\”1\”}]”, “frequency”: 30, “scene_name”: “龙宫控制系统” } ], “code”: 200, “msg”: “查询成功”} |
查看设备协议数据 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api/monitor/protocal/list | |
method | GET | |
header | Authorization:Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA Cookie:username=admin; password=RctI2NgdNjPXbUlKfdmWljCdH+2lDMpjQXLA7Ubam1rd2256efuh8Gmo1tQZdu21CFpbBeXYDzl1iJASFJ+u0Q==; rememberMe=true; Admin-Token=eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA | |
url 参数说明 | ||
body | ||
return | 失败 {“rows”: null,”code”: 200, “msg”: “查询成功”}成功 { “total”: 6, “rows”: [ { “id”: 2, “delete_flag”: 0, “name”: “HTBUS协议”, “matcher”: “{\”data_head\”:\”FE FE 00\”,\”data_end_type\”:0,\”data_len\”:\”12\”,\”check_start\”:\”1\”,\”check_end\”:\”11\”,\”data_end\”:\”98\”}”, “register”: “protocalBytesSolve”, “mtime”: “2022-11-29T14:02:38.000+08:00” } ], “code”: 200, “msg”: “查询成功”} |
查看设备分组数据 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api/system/groups/list?pageNum=1&pageSize=10000 | |
method | GET | |
header | Authorization:Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA Cookie:username=admin; password=RctI2NgdNjPXbUlKfdmWljCdH+2lDMpjQXLA7Ubam1rd2256efuh8Gmo1tQZdu21CFpbBeXYDzl1iJASFJ+u0Q==; rememberMe=true; Admin-Token=eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA | |
url 参数说明 | pageNum:第几页 pageSize:每页条数 | |
body | ||
return | 失败 {“rows”: null,”code”: 200, “msg”: “查询成功”}成功 { “total”: 334, “rows”: [ { “createBy”: null, “createTime”: null, “updateBy”: null, “updateTime”: null, “remark”: null, “id”: 4, “name”: “A区设备”, “sort”: 1, “createtime”: “2023-04-09 22:45:10”, “updatetime”: null, “userid”: null }, { “createBy”: null, “createTime”: null, “updateBy”: null, “updateTime”: null, “remark”: null, “id”: 5, “name”: “DTU”, “sort”: 1, “createtime”: “2023-04-18 13:30:30”, “updatetime”: null, “userid”: 214 } ], “code”: 200, “msg”: “查询成功”} |
查看设备产品模板数据 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api/monitor/productPage/list?status=1&pageNum=1&pageSize=10000 | |
method | GET | |
header | Authorization:Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA Cookie:username=admin; password=RctI2NgdNjPXbUlKfdmWljCdH+2lDMpjQXLA7Ubam1rd2256efuh8Gmo1tQZdu21CFpbBeXYDzl1iJASFJ+u0Q==; rememberMe=true; Admin-Token=eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA | |
url 参数说明 | pageNum:第几页 pageSize:每页条数 | |
body | ||
return | 失败 {“rows”: null,”code”: 200, “msg”: “查询成功”}成功 { “total”: 131, “rows”: [ { “id”: 258, “delete_flag”: 0, “name”: “WF7206+F”, “iot_protocal_category”: “ProtocalModbusTcp”, “ver”: “”, “campany”: “数之路”, “remark”: “”, “atime”: “2024-04-11T18:00:40.000+08:00”, “param”: “1”, “product_code”: “84F3EBD6F74B”, “status”: 1, “category”: “串口模块”, “sub_category”: “串口转以太网”, “type”: 2, “userId”: 1014 }, { “id”: 257, “delete_flag”: 0, “name”: “雨量”, “iot_protocal_category”: “ProtocalModbus”, “pro_img”: “/stage-api/profile/upload/2024/04/09/blob_20240409153002A004.png”, “ver”: “”, “campany”: “y1”, “remark”: “”, “atime”: “2024-04-09T15:30:18.000+08:00”, “param”: “1”, “product_code”: “0001”, “status”: 1, “category”: “1”, “sub_category”: “2”, “type”: 2, “userId”: 1065 } ], “code”: 200, “msg”: “查询成功”} |
寄存器管理 #
查看批量读寄存器的数据 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api/device/sensor/list?node_id=274&pageNum=0&pageSize=10 | |
method | GET | |
header | Authorization:Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA Cookie:username=admin; password=RctI2NgdNjPXbUlKfdmWljCdH+2lDMpjQXLA7Ubam1rd2256efuh8Gmo1tQZdu21CFpbBeXYDzl1iJASFJ+u0Q==; rememberMe=true; Admin-Token=eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA | |
url 参数说明 | node_id:设备ID pageNum:第几页 pageSize:每页条数 | |
body | ||
return | 失败 {“rows”: null,”code”: 200, “msg”: “查询成功”}成功 { “total”: 1, “rows”: [ { “id”: 1017, “delete_flag”: 0, “name”: “第一路继电器”, “measure_unit_type”: 71, “iot_sensor_type”: 27, “node_id”: 274, “sensor_device_id”: “1”, “port_id”: “5”, “sdata”: 0, “seq”: 1, “iot_sensor_status”: 18, “request_sdata”: 0, “register_time”: “2024-04-08T23:34:43.000+08:00”, “atime”: “2024-04-08T23:34:43.000+08:00”, “mtime”: “2024-04-08T23:34:43.000+08:00”, “data_type”: 0, “infos”: “{\”type\”:\”char\”,\”readType\”:1,\”order\”:null,\”open_self\”:\”11 22 33 44 55 00 00 01 0F\”,\”close_self\”:\”11 22 33 44 55 00 00 00 0F\”,\”ascnum\”:null,\”format\”:\”byte\”}”, “store_strage”: 271, “node_name”: “环境检测”, “triggerList”: [], “historyDara”: [] } ], “code”: 200, “msg”: “查询成功”} |
下发写寄存器指令 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api/device/sensor/sensorparamdown | |
method | PUT | |
header | Authorization:Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA Cookie:username=admin; password=RctI2NgdNjPXbUlKfdmWljCdH+2lDMpjQXLA7Ubam1rd2256efuh8Gmo1tQZdu21CFpbBeXYDzl1iJASFJ+u0Q==; rememberMe=true; Admin-Token=eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA | |
url 参数说明 | – | |
body | {id: 1077,sdata: “123456”} | // 寄存器id// 下发数据 |
return | 失败 { “msg”: “已下线!”, “code”: 500}成功 { “msg”: “下发成功!”, “code”: 200} |
下发开关指令-开指令 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api/device/sensor/sensorcontrolRealtimeUpdate | |
method | PUT | |
header | Authorization:Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA Cookie:username=admin; password=RctI2NgdNjPXbUlKfdmWljCdH+2lDMpjQXLA7Ubam1rd2256efuh8Gmo1tQZdu21CFpbBeXYDzl1iJASFJ+u0Q==; rememberMe=true; Admin-Token=eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA | |
url 参数说明 | – | |
body | {id: 1077,request_sdata: “1”} | // 寄存器id// 下发“1”开状态指令 |
return | 失败 { “msg”: “已下线!”, “code”: 500}成功 { “msg”: “下发成功!”, “code”: 200} |
下发开关指令-关指令 #
接口调用地址以及参数说明 | ||
url | https://iot.modbus.cn/stage-api/device/sensor/sensorcontrolRealtimeUpdate | |
method | PUT | |
header | Authorization:Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA Cookie:username=admin; password=RctI2NgdNjPXbUlKfdmWljCdH+2lDMpjQXLA7Ubam1rd2256efuh8Gmo1tQZdu21CFpbBeXYDzl1iJASFJ+u0Q==; rememberMe=true; Admin-Token=eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjAzNzk5OGJjLTk0MzEtNGJjNC1hYTlhLWViNGExZGYwZjQwNSJ9._uz6r2R1uMJU0kS2fEntAfrr1kTCTe57hBodOM3ulJkPpEjBo9Ux4RXE8O7xhnNcW3wn9CYZIhQdIBv5ByBEWA | |
url 参数说明 | – | |
body | {id: 1077,request_sdata: “0”} | // 寄存器id// 下发“0”开状态指令 |
return | 失败 { “msg”: “已下线!”, “code”: 500}成功 { “msg”: “下发成功!”, “code”: 200} |