From aa7d242e78390093ce475bb4d556774d6c7e68a6 Mon Sep 17 00:00:00 2001 From: chenlinghy Date: Fri, 28 Aug 2020 15:27:42 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E4=BF=AE=E6=94=B9Readme.md?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Readme.md | 325 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 278 insertions(+), 47 deletions(-) diff --git a/Readme.md b/Readme.md index 5584f4a0..1ff3747b 100644 --- a/Readme.md +++ b/Readme.md @@ -5,13 +5,16 @@ ----|---- Request URI|dispose/auth/login Content type|application/json;charset=UTF-8 - Body|{"ver":2,"cryptoType":0,"timeStamp":1587604296988,"msgContent":"{\"password\":\"c3855e6b6bb120450f160ba91134522868f89d36062f2061ebeefd80817e1d58\",\"userName\":\"admin\"}"} + Body|{"ver":3,"cryptoType":0,"timeStamp":1587604296988,"msgContent":"{\"password\":\"c3855e6b6bb120450f160ba91134522868f89d36062f2061ebeefd80817e1d58\",\"userName\":\"admin\"}"} ```json { - "ver": 2, - "cryptoType": 0, - "timeStamp": 1587604296988, - "msgContent":"{\"password\":\"c3855e6b6bb120450f160ba91134522868f89d36062f2061ebeefd80817e1d58\",\"userName\":\"admin\"}" + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598580612302, + "msgContent": { + "password": "c3855e6b6bb120450f160ba91134522868f89d36062f2061ebeefd80817e1d58", + "userName": "admin" + } } ``` @@ -19,14 +22,23 @@ 字段|内容 ----|---- Content type|application/json;charset=UTF-8 - Body|{"ver":2,"cryptoType":0,"timeStamp":1589437655540,"code":200,"msgContent":"{\"userName\":\"admin\",\"token\":\"6ffd266820a338d95822657a2b4df2cc42f8ad783325eb684598e5ce9070d884\",\"logTime\":1589437655523,\"expireTime\":1589441255524,\"status\":0,\"message\":\"成功\"}"} + Body|{"ver":3,"cryptoType":0,"timeStamp":1598580612302,"code":200,"msgContent":"{\"userName\":\"admin\",\"token\":\"ed42284a31337b41c2ba2cc061754c60b0f4e659601ecc5c06daab25bd041e17\",\"logTime\":1598580612302,\"expireTime\":1598580612302,\"status\":0,\"message\":[\"成功\"]}"} ```json { - "ver": 2, - "cryptoType": 0, - "timeStamp": 1589437655540, - "code": 200, - "msgContent":"{\"userName\":\"admin\",\"token\":\"6ffd266820a338d95822657a2b4df2cc42f8ad783325eb684598e5ce9070d884\",\"logTime\":1589437655523,\"expireTime\":1589441255524,\"status\":0,\"message\":\"成功\"}" + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598580612302, + "code": 200, + "msgContent": { + "userName": "admin", + "token": "ed42284a31337b41c2ba2cc061754c60b0f4e659601ecc5c06daab25bd041e17", + "logTime": 1598580612302, + "expireTime": 1598580612302, + "status": 0, + "message": [ + "成功" + ] + } } ``` @@ -37,27 +49,35 @@ Request URI|dispose/auth/logout Content type|application/json;charset=UTF-8 Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e" - Body|{"ver":2,"cryptoType":0,"timeStamp":1589438109410,"msgContent":"{\"userName\":\"admin\"}"} + Body|{"ver":3,"cryptoType":0,"timeStamp":1598582999559,"msgContent":"{\"userName\":\"admin\"}"} ```json { - "ver": 2, - "cryptoType": 0, - "timeStamp": 1589438109410, - "msgContent": "{\"userName\":\"admin\"}" + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598582999559, + "msgContent": { + "userName": "admin" + } } ``` + 响应消息 字段|内容 ----|---- Content type|application/json;charset=UTF-8 - Body|{"ver":2,"cryptoType":0,"timeStamp":1589438109527,"code":200,"msgContent":"{\"userName\":\"admin\",\"status\":0,\"message\":\"成功\"}"} + Body|{"ver":3,"cryptoType":0,"timeStamp":1598582999559,"code":200,"msgContent":"{\"userName\":\"admin\",\"status\":0,\"message\":[\"成功\"]}"} ```json { - "ver": 2, - "cryptoType": 0, - "timeStamp": 1589438109527, - "code": 200, - "msgContent":"{\"userName\":\"admin\",\"status\":0,\"message\":\"成功\"}" + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598582999559, + "code": 200, + "msgContent": { + "userName": "admin", + "status": 0, + "message": [ + "成功" + ] + } } ``` @@ -68,27 +88,67 @@ Request URI|dispose/manager/device Content type|application/json;charset=UTF-8 Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e" - Body|{"ver":2,"cryptoType":0,"timeStamp":1589437275258,"msgContent":"{\"items\":[{\"areaCode\":0,\"ipAddr\":\"10.88.77.15\",\"manufacturer\":\"DPTech\",\"model\":\"UMC\",\"name\":\"中移杭研实验室清洗设备\",\"readme\":\"实验室测试设备\",\"type\":0,\"version\":\"5.7.13\"}]}"} + Body|{"ver":3,"cryptoType":0,"timeStamp":1598596150287,"msgContent":"{\"items\":[{\"ipAddr\":\"10.88.77.15\",\"ipPort\":\"\", + \"deviceType\":0,\"areaCode\":0,\"deviceName\":\"中移杭研实验室迪普清洗设备\",\"manufacturer\":\"DPTech\",\"model\":\"UMC\", + \"version\":\"5.7.13\",\"userName\":\"admin\",\"password\":\"UMCAdministrator\",\"urlPath\":\"UMC/service/AbnormalFlowCleaningService\",\"urlType\":0,\"readme\":\"实验室测试设备\", \"capacity\":[{\"capacityType\":0,\"objectType\":1,\"ipType\":3,\"protectIp\":\"0.0.0.0\"}]}]}"} ```json { - "ver": 2, - "cryptoType": 0, - "timeStamp": 1589437275258, - "msgContent":"{\"items\":[{\"areaCode\":0,\"ipAddr\":\"10.88.77.15\",\"manufacturer\":\"DPTech\",\"model\":\"UMC\",\"name\":\"中移杭研实验室清洗设备\",\"readme\":\"实验室测试设备\",\"type\":0,\"version\":\"5.7.13\"}]}" + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598596150287, + "msgContent":{ + "items": [ + { + "ipAddr": "10.88.77.15", + "ipPort": "", + "deviceType": 0, + "areaCode": 0, + "deviceName": "中移杭研实验室迪普清洗设备", + "manufacturer": "DPTech", + "model": "UMC", + "version": "5.7.13", + "userName": "admin", + "password": "UMCAdministrator", + "urlPath": "UMC/service/AbnormalFlowCleaningService", + "urlType": 0, + "readme": "实验室测试设备", + "capacity": [ + { + "capacityType": 0, + "objectType": 1, + "ipType": 3, + "protectIp": "0.0.0.0" + } + ] + } + ] + } } ``` + 响应消息 字段|内容 ----|---- Content type|application/json;charset=UTF-8 - Body|{"ver":2,"cryptoType":0,"timeStamp":1589437275451,"code":200,"msgContent":"{\"items\":[{\"ipAddr\":\"10.88.77.15\",\"devId\":\"1\",\"status\":20,\"message\":\"设备已经存在\"}]}"} + Body|{"ver":3,"cryptoType":0,"timeStamp":1598596150287,"code":200,"msgContent":"{\"items\":[{\"ipAddr\":\"10.88.77.15\",{\"ipPort\":\"\",\"devId\":\"572\",\"status\":0,\"message\":[\"成功\"]}]}"} ```json { - "ver": 2, - "cryptoType": 0, - "timeStamp": 1589437275451, - "code": 200, - "msgContent": "{\"items\":[{\"ipAddr\":\"10.88.77.15\",\"devId\":\"1\",\"status\":20,\"message\":\"设备已经存在\"}]}" + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598596150287, + "code": 200, + "msgContent": { + "items": [ + { + "ipAddr": "10.88.77.15", + "ipPort": "", + "devId": "572", + "status": 0, + "message": [ + "成功" + ] + } + ] + } } ``` @@ -99,30 +159,201 @@ Request URI|dispose/manager/device Content type|application/json;charset=UTF-8 Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e" - Body|{"ver":2,"cryptoType":0,"timeStamp":1589437091399,"msgContent":"{\"id\":[\"1\"]}"} + Body|{"ver":3,"cryptoType":0,"timeStamp":1598596120673,"msgContent":"{\"id\":[\"572\", \"36\"]}"} ```json { - "ver": 2, - "cryptoType": 0, - "timeStamp": 1589437091399, - "msgContent":"{\"id\":[\"1\"]}" + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598596120673, + "msgContent": { + "id" : ["572", "36"] + } } ``` + 响应消息 字段|内容 ----|---- Content type|application/json;charset=UTF-8 - Body|{"ver":2,"cryptoType":0,"timeStamp":1589437091565,"code":200,"msgContent":"[{\"id\":\"1\",\"status\":0,\"message\":\"成功\"}]"} + Body|{"ver":3,"cryptoType":0,"timeStamp":1598596120673,"code":200,"msgContent":"[{\"id\":\"572\",\"devStatus\":\"DELETED\",\"status\":0,\"message\":[\"成功\"]}, {\"id\":\"36\",\"devStatus\":\"NORMAL\",\"status\":19,\"message\":[\"没有这个设备\"]}]"} ```json { - "ver": 2, - "cryptoType": 0, - "timeStamp": 1589437091565, - "code": 200, - "msgContent":"[{\"id\":\"1\",\"status\":0,\"message\":\"成功\"}]" + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598596120673, + "code": 200, + "msgContent": [ + { + "id": "572", + "devStatus": "DELETED", + "status": 0, + "message": [ + "成功" + ] + }, + { + "id": "36", + "devStatus": "NORMAL", + "status": 19, + "message": [ + "没有这个设备" + ] + } + ] } ``` +## 更新节点 ++ 请求命令 + 字段|内容 + ----|---- + Request URI|dispose/manager/upgrade + Content type|application/json;charset=UTF-8 + Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e" + Body|{"ver":3,"cryptoType":0,"timeStamp":1598596022176,"msgContent":"{\"items\":[{\"ipAddr\":\"10.88.77.15\",\"ipPort\":\"\", + \"deviceType\":0,\"areaCode\":0,\"deviceName\":\"中移杭研实验室迪普清洗设备\",\"manufacturer\":\"DPTech\",\"model\":\"UMC\", + \"version\":\"5.7.16\",\"userName\":\"admin\",\"password\":\"UMCAdministrator\",\"urlPath\":\"UMC/service/AbnormalFlowCleaningService\",\"urlType\":0,\"readme\":\"实验室测试设备\", \"capacity\":[{\"capacityType\":0,\"objectType\":1,\"ipType\":3,\"protectIp\":\"192.168.1.5-192.168.1.20\"}]}]}"} +```json +{ + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598596022176, + "msgContent":{ + "items": [ + { + "ipAddr": "10.88.77.15", + "ipPort": "", + "deviceType": 0, + "areaCode": 0, + "deviceName": "中移杭研实验室迪普清洗设备", + "manufacturer": "DPTech", + "model": "UMC", + "version": "5.7.16", + "userName": "admin", + "password": "UMCAdministrator", + "urlPath": "UMC/service/AbnormalFlowCleaningService", + "urlType": 0, + "readme": "实验室测试设备", + "capacity": [ + { + "capacityType": 0, + "objectType": 1, + "ipType": 3, + "protectIp": "192.168.1.5-192.168.1.20" + } + ] + } + ] + } +} +``` ++ 响应消息 + 字段|内容 + ----|---- + Content type|application/json;charset=UTF-8 + Body|{"ver":3,"cryptoType":0,"timeStamp":1598596022176,"code":200,"msgContent":[{\"id\":\"572\",\"status\":0,\"message\":[\"成功\"]}]"} +```json +{ + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598596022176, + "code": 200, + "msgContent": [ + { + "id": "572", + "status": 0, + "message": [ + "成功" + ] + } + ] +} +``` + +## 获取全部节点 ++ 请求命令 + 字段|内容 + ----|---- + Request URI|dispose/manager/device_list + Content type|application/json;charset=UTF-8 + Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e" + Body|{"ver":3,"cryptoType":0,"timeStamp":1598596065234,"msgContent":"{\"startPage\":1,\"pageSize\":\"10\"}"} +```json +{ + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598596065234, + "msgContent": { + "startPage": 1, + "pageSize": "10" + } +} +``` ++ 响应消息 + 字段|内容 + ----|---- + Content type|application/json;charset=UTF-8 + Body|{"ver":3,"cryptoType":0,"timeStamp":1598596065234,"code":200,"msgContent":{\"curPageNumber\":1,\"pageSize\":10,\"totalItems\":2,\"totalPages\":1,\"status\":0,\"message\":[\"成功\"],\"items\":[{\"id\":\"573\",\"ipAddr\":\"10.***.***.88\",\"ipPort\":\"18080\",\"deviceType\":1,\"areaCode\":0, \"deviceName\":\"中移杭研实验室浩瀚清洗设备\",\"manufacturer\":\"Haohan\",\"model\":\"Unknown\",\"version\":\"Unknown\",\"userName\":\"\",\"urlType\":0,\"readme\":\"实验室测试设备\",\"capacity\":[{\"capacityType\":0, \"objectType\":1,\"ipType\":3,\"protectIp\":\"0.0.0.0\"}],\"devStatus\":0}, {\"id\":\"572\",\"ipAddr\":\"10.***.***.15\",\"ipPort\":\"\",\"deviceType\":0,\"areaCode\":0,\"deviceName\":\"中移杭研实验室迪普清洗设备\",\"manufacturer\":\"DPTech\",\"model\":\"UMC\",\"version\":\"5.7.16\",\"userName\":\"adm****\",\"urlType\":0,\"readme\":\"实验室测试设备\",\"capacity\":[],\"devStatus\":0}]}"} +```json +{ + "ver": 3, + "cryptoType": 0, + "timeStamp": 1598596065234, + "code": 200, + "msgContent": { + "curPageNumber": 1, + "pageSize": 10, + "totalItems": 2, + "totalPages": 1, + "status": 0, + "message": [ + "成功" + ], + "items": [ + { + "id": "573", + "ipAddr": "10.***.***.88", + "ipPort": "18080", + "deviceType": 1, + "areaCode": 0, + "deviceName": "中移杭研实验室浩瀚清洗设备", + "manufacturer": "Haohan", + "model": "Unknown", + "version": "Unknown", + "userName": "", + "urlType": 0, + "readme": "实验室测试设备", + "capacity": [ + { + "capacityType": 0, + "objectType": 1, + "ipType": 3, + "protectIp": "0.0.0.0" + } + ], + "devStatus": 0 + }, + { + "id": "572", + "ipAddr": "10.***.***.15", + "ipPort": "", + "deviceType": 0, + "areaCode": 0, + "deviceName": "中移杭研实验室迪普清洗设备", + "manufacturer": "DPTech", + "model": "UMC", + "version": "5.7.16", + "userName": "adm****", + "urlType": 0, + "readme": "实验室测试设备", + "capacity": [], + "devStatus": 0 + } + ] + } +} +``` + + ## 获取节点版本信息 + 请求命令 字段|内容 @@ -417,7 +648,7 @@ "ver": 2, "cryptoType": 0, "timeStamp": 1587604296988, - "msgContent": "{\"id\":-1,\"type\":0, \"disposeIp\":\"192.168.3.2\", \"disposeTime\":120}" + "msgContent": "{\"id\":-1,\"type\":0, \"disposeIp\":\"192.168.3.2\", \"disposeTime\":120}"} } ``` + 响应消息 @@ -463,7 +694,7 @@ "cryptoType": 0, "timeStamp": 1589421779138, "code": 200, - "msgContent": "{\"items\":[{\"id\":\"1\",\"taskId\":\"60\",\"type\":0,\"disposeIp\":\"192.168.3.2\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"},{\"id\":\"-1\",\"taskId\":\"2\",\"type\":0,\"status\":30,\"message\":\"没有该任务\"}]}" + "msgContent": :"{\"items\":[{\"id\":\"1\",\"taskId\":\"60\",\"type\":0,\"disposeIp\":\"192.168.3.2\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"},{\"id\":\"-1\",\"taskId\":\"2\",\"type\":0,\"status\":30,\"message\":\"没有该任务\"}]}" } ``` @@ -542,7 +773,7 @@ "ver": 2, "cryptoType": 0, "timeStamp": 1587604296988, - "msgContent":"{\"type\":0}" + "msgContent":"{\"type\":0}"} } ``` + 响应消息