REM:
1. 修改Readme.md文件
This commit is contained in:
chenlinghy 2020-08-28 15:27:42 +08:00
parent c0c50c6d16
commit aa7d242e78
1 changed files with 278 additions and 47 deletions

325
Readme.md
View File

@ -5,13 +5,16 @@
----|---- ----|----
Request URI|dispose/auth/login Request URI|dispose/auth/login
Content type|application/json;charset=UTF-8 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 ```json
{ {
"ver": 2, "ver": 3,
"cryptoType": 0, "cryptoType": 0,
"timeStamp": 1587604296988, "timeStamp": 1598580612302,
"msgContent":"{\"password\":\"c3855e6b6bb120450f160ba91134522868f89d36062f2061ebeefd80817e1d58\",\"userName\":\"admin\"}" "msgContent": {
"password": "c3855e6b6bb120450f160ba91134522868f89d36062f2061ebeefd80817e1d58",
"userName": "admin"
}
} }
``` ```
@ -19,14 +22,23 @@
字段|内容 字段|内容
----|---- ----|----
Content type|application/json;charset=UTF-8 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 ```json
{ {
"ver": 2, "ver": 3,
"cryptoType": 0, "cryptoType": 0,
"timeStamp": 1589437655540, "timeStamp": 1598580612302,
"code": 200, "code": 200,
"msgContent":"{\"userName\":\"admin\",\"token\":\"6ffd266820a338d95822657a2b4df2cc42f8ad783325eb684598e5ce9070d884\",\"logTime\":1589437655523,\"expireTime\":1589441255524,\"status\":0,\"message\":\"成功\"}" "msgContent": {
"userName": "admin",
"token": "ed42284a31337b41c2ba2cc061754c60b0f4e659601ecc5c06daab25bd041e17",
"logTime": 1598580612302,
"expireTime": 1598580612302,
"status": 0,
"message": [
"成功"
]
}
} }
``` ```
@ -37,27 +49,35 @@
Request URI|dispose/auth/logout Request URI|dispose/auth/logout
Content type|application/json;charset=UTF-8 Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e" Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":2,"cryptoType":0,"timeStamp":1589438109410,"msgContent":"{\"userName\":\"admin\"}"} Body|{"ver":3,"cryptoType":0,"timeStamp":1598582999559,"msgContent":"{\"userName\":\"admin\"}"}
```json ```json
{ {
"ver": 2, "ver": 3,
"cryptoType": 0, "cryptoType": 0,
"timeStamp": 1589438109410, "timeStamp": 1598582999559,
"msgContent": "{\"userName\":\"admin\"}" "msgContent": {
"userName": "admin"
}
} }
``` ```
+ 响应消息 + 响应消息
字段|内容 字段|内容
----|---- ----|----
Content type|application/json;charset=UTF-8 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 ```json
{ {
"ver": 2, "ver": 3,
"cryptoType": 0, "cryptoType": 0,
"timeStamp": 1589438109527, "timeStamp": 1598582999559,
"code": 200, "code": 200,
"msgContent":"{\"userName\":\"admin\",\"status\":0,\"message\":\"成功\"}" "msgContent": {
"userName": "admin",
"status": 0,
"message": [
"成功"
]
}
} }
``` ```
@ -68,27 +88,67 @@
Request URI|dispose/manager/device Request URI|dispose/manager/device
Content type|application/json;charset=UTF-8 Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e" 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 ```json
{ {
"ver": 2, "ver": 3,
"cryptoType": 0, "cryptoType": 0,
"timeStamp": 1589437275258, "timeStamp": 1598596150287,
"msgContent":"{\"items\":[{\"areaCode\":0,\"ipAddr\":\"10.88.77.15\",\"manufacturer\":\"DPTech\",\"model\":\"UMC\",\"name\":\"中移杭研实验室清洗设备\",\"readme\":\"实验室测试设备\",\"type\":0,\"version\":\"5.7.13\"}]}" "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 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 ```json
{ {
"ver": 2, "ver": 3,
"cryptoType": 0, "cryptoType": 0,
"timeStamp": 1589437275451, "timeStamp": 1598596150287,
"code": 200, "code": 200,
"msgContent": "{\"items\":[{\"ipAddr\":\"10.88.77.15\",\"devId\":\"1\",\"status\":20,\"message\":\"设备已经存在\"}]}" "msgContent": {
"items": [
{
"ipAddr": "10.88.77.15",
"ipPort": "",
"devId": "572",
"status": 0,
"message": [
"成功"
]
}
]
}
} }
``` ```
@ -99,30 +159,201 @@
Request URI|dispose/manager/device Request URI|dispose/manager/device
Content type|application/json;charset=UTF-8 Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e" 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 ```json
{ {
"ver": 2, "ver": 3,
"cryptoType": 0, "cryptoType": 0,
"timeStamp": 1589437091399, "timeStamp": 1598596120673,
"msgContent":"{\"id\":[\"1\"]}" "msgContent": {
"id" : ["572", "36"]
}
} }
``` ```
+ 响应消息 + 响应消息
字段|内容 字段|内容
----|---- ----|----
Content type|application/json;charset=UTF-8 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 ```json
{ {
"ver": 2, "ver": 3,
"cryptoType": 0, "cryptoType": 0,
"timeStamp": 1589437091565, "timeStamp": 1598596120673,
"code": 200, "code": 200,
"msgContent":"[{\"id\":\"1\",\"status\":0,\"message\":\"成功\"}]" "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, "ver": 2,
"cryptoType": 0, "cryptoType": 0,
"timeStamp": 1587604296988, "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, "cryptoType": 0,
"timeStamp": 1589421779138, "timeStamp": 1589421779138,
"code": 200, "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, "ver": 2,
"cryptoType": 0, "cryptoType": 0,
"timeStamp": 1587604296988, "timeStamp": 1587604296988,
"msgContent":"{\"type\":0}" "msgContent":"{\"type\":0}"}
} }
``` ```
+ 响应消息 + 响应消息