dispose/Readme.md

1137 lines
34 KiB
Markdown
Raw Normal View History

# 处置模块接口协议
## 登录
+ 请求命令
字段|内容
----|----
Request URI|dispose/auth/login
Content type|application/json;charset=UTF-8
2020-08-28 07:27:42 +00:00
Body|{"ver":3,"cryptoType":0,"timeStamp":1587604296988,"msgContent":"{\"password\":\"c3855e6b6bb120450f160ba91134522868f89d36062f2061ebeefd80817e1d58\",\"userName\":\"admin\"}"}
```json
{
2020-08-28 07:27:42 +00:00
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598580612302,
"msgContent": {
"password": "c3855e6b6bb120450f160ba91134522868f89d36062f2061ebeefd80817e1d58",
"userName": "admin"
}
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
2020-08-28 07:27:42 +00:00
Body|{"ver":3,"cryptoType":0,"timeStamp":1598580612302,"code":200,"msgContent":"{\"userName\":\"admin\",\"token\":\"ed42284a31337b41c2ba2cc061754c60b0f4e659601ecc5c06daab25bd041e17\",\"logTime\":1598580612302,\"expireTime\":1598580612302,\"status\":0,\"message\":[\"成功\"]}"}
```json
{
2020-08-28 07:27:42 +00:00
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598580612302,
"code": 200,
"msgContent": {
"userName": "admin",
"token": "ed42284a31337b41c2ba2cc061754c60b0f4e659601ecc5c06daab25bd041e17",
"logTime": 1598580612302,
"expireTime": 1598580612302,
"status": 0,
"message": [
"成功"
]
}
}
```
## 注销
+ 请求命令
字段|内容
----|----
Request URI|dispose/auth/logout
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
2020-08-28 07:27:42 +00:00
Body|{"ver":3,"cryptoType":0,"timeStamp":1598582999559,"msgContent":"{\"userName\":\"admin\"}"}
```json
{
2020-08-28 07:27:42 +00:00
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598582999559,
"msgContent": {
"userName": "admin"
}
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
2020-08-28 07:27:42 +00:00
Body|{"ver":3,"cryptoType":0,"timeStamp":1598582999559,"code":200,"msgContent":"{\"userName\":\"admin\",\"status\":0,\"message\":[\"成功\"]}"}
```json
{
2020-08-28 07:27:42 +00:00
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598582999559,
"code": 200,
"msgContent": {
"userName": "admin",
"status": 0,
"message": [
"成功"
]
}
}
```
## 添加设备
+ 请求命令
字段|内容
----|----
Request URI|dispose/manager/device
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
2020-08-28 07:27:42 +00:00
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": 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
2020-08-28 07:27:42 +00:00
Body|{"ver":3,"cryptoType":0,"timeStamp":1598596150287,"code":200,"msgContent":"{\"items\":[{\"ipAddr\":\"10.88.77.15\",{\"ipPort\":\"\",\"devId\":\"572\",\"status\":0,\"message\":[\"成功\"]}]}"}
```json
{
2020-08-28 07:27:42 +00:00
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598596150287,
"code": 200,
"msgContent": {
"items": [
{
"ipAddr": "10.88.77.15",
"ipPort": "",
"devId": "572",
"status": 0,
"message": [
"成功"
]
}
]
}
}
```
## 删除设备
+ 请求命令
字段|内容
----|----
Request URI|dispose/manager/device
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
2020-08-28 07:27:42 +00:00
Body|{"ver":3,"cryptoType":0,"timeStamp":1598596120673,"msgContent":"{\"id\":[\"572\", \"36\"]}"}
```json
{
2020-08-28 07:27:42 +00:00
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598596120673,
"msgContent": {
"id" : ["572", "36"]
}
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
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": 3,
"cryptoType": 0,
"timeStamp": 1598596120673,
"code": 200,
"msgContent": [
{
"id": "572",
"devStatus": "DELETED",
"status": 0,
"message": [
"成功"
]
},
{
"id": "36",
"devStatus": "NORMAL",
"status": 19,
"message": [
"没有这个设备"
]
}
]
}
```
## 更新设备
2020-08-28 07:27:42 +00:00
+ 请求命令
字段|内容
----|----
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
2020-08-28 07:27:42 +00:00
Body|{"ver":3,"cryptoType":0,"timeStamp":1598596022176,"code":200,"msgContent":[{\"id\":\"572\",\"status\":0,\"message\":[\"成功\"]}]"}
```json
{
2020-08-28 07:27:42 +00:00
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598596022176,
"code": 200,
"msgContent": [
{
"id": "572",
"status": 0,
"message": [
"成功"
]
}
]
}
```
## 获取全部设备
2020-08-28 07:27:42 +00:00
+ 请求命令
字段|内容
----|----
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
}
]
}
}
```
## 能力节点信息
+ 请求命令
字段|内容
----|----
Request URI|dispose/info/areaInfo
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":3,"cryptoType":0,"timeStamp":1600738402459,"code":200,"msgContent":"{\"items\":[{\"nodeId\":\"0\",\"totalNetflow\":60,\"capacityType\":[0,1],\"onlineDevices\":1,\"totalDevices\":4},{\"nodeId\":\"3\",\"totalNetflow\":0,\"capacityType\":[0],\"onlineDevices\":1,\"totalDevices\":1}],\"status\":0,\"message\":[\"成功\"]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1600738402459,
"code": 200,
"msgContent": {
"items": [
{
"nodeId": "0",
"totalNetflow": 60,
"capacityType": [
0,
1
],
"onlineDevices": 1,
"totalDevices": 4
},
{
"nodeId": "3",
"totalNetflow": 0,
"capacityType": [
0
],
"onlineDevices": 1,
"totalDevices": 1
}
],
"status": 0,
"message": [
"成功"
]
}
}
```
## 平台版本信息
+ 请求命令
字段|内容
----|----
Request URI|dispose/info/platformVersion
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":3,"cryptoType":0,"timeStamp":1600738977137,"code":200,"msgContent":"{\"platVer\":{\"buildTime\":\"2020-09-18T15:11:38+0800\",\"commitDescribe\":\"v2.0.0_rc1-23-g22ec624-dirty\",\"commitId\":\"22ec62482cb1b99cf06dd301a3e53298ec0efca2\",\"commitTime\":\"2020-09-18T09:31:51+0800\",\"gitBranch\":\"master\",\"tagName\":\"v2.0.0_rc1\"},\"status\":0,\"message\":[\"成功\"]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1600738977137,
"code": 200,
"msgContent": {
"platVer": {
"buildTime": "2020-09-18T15:11:38+0800",
"commitDescribe": "v2.0.0_rc1-23-g22ec624-dirty",
"commitId": "22ec62482cb1b99cf06dd301a3e53298ec0efca2",
"commitTime": "2020-09-18T09:31:51+0800",
"gitBranch": "master",
"tagName": "v2.0.0_rc1"
},
"status": 0,
"message": [
"成功"
]
}
}
```
## 设备版本信息
+ 请求命令
字段|内容
----|----
Request URI|dispose/info/deviceVersion
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":3,"cryptoType":0,"timeStamp":1600739264314,"msgContent":"{\"id\":[\"571\",\"572\",\"573\"]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1600739264314,
"msgContent": {
"id": [
"571",
"572",
"573"
]
}
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":3,"cryptoType":0,"timeStamp":1600739264314,"code":200,"msgContent":"{\"items\":[{\"id\":\"571\",\"status\":19,\"message\":[\"没有这个设备\"]}, {\"id\":\"572\",\"ipAddr\":\"10.88.77.15\",\"ipPort\":\"80\",\"version\":\"5.7.31\",\"status\":0,\"message\":[\"成功\"]},{\"id\":\"573\",\"ipAddr\":\"10.88.77.88\",\"ipPort\":\"18080\",\"version\":\"Unknown\",\"status\":0,\"message\":[\"成功\"]}]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1600739264314,
"code": 200,
"msgContent": {
"items": [
{
"id": "571",
"status": 19,
"message": [
"没有这个设备"
]
},
{
"id": "572",
"ipAddr": "10.88.77.15",
"ipPort": "80",
"version": "5.7.31",
"status": 0,
"message": [
"成功"
]
},
{
"id": "573",
"ipAddr": "10.88.77.88",
"ipPort": "18080",
"version": "Unknown",
"status": 0,
"message": [
"成功"
]
}
]
}
}
```
## 设备在线状态
+ 请求命令
字段|内容
----|----
Request URI|dispose/info/deviceLinkStatus
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":3,"cryptoType":0,"timeStamp":1600739818013,"msgContent":"{\"id\":[\"571\",\"572\",\"573\"]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1600739818013,
"msgContent": {
"id": [
"571",
"572",
"573"
]
}
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":3,"cryptoType":0,"timeStamp":1600741828940,"code":200,"msgContent":"{\"items\":[{\"id\":\"571\",\"status\":19,\"message\":[\"没有这个设备\"]},{\"id\":\"572\",\"ipAddr\":\"10.88.77.15\",\"ipPort\":\"80\",\"online\":1,\"status\":0,\"message\":[\"成功\"]},{\"id\":\"573\",\"ipAddr\":\"10.88.77.88\",\"ipPort\":\"18080\",\"online\":1,\"status\":0,\"message\":[\"成功\"]} ]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1600741828940,
"code": 200,
"msgContent": {
"items": [
{
"id": "571",
"status": 19,
"message": [
"没有这个设备"
]
},
{
"id": "572",
"ipAddr": "10.88.77.15",
"ipPort": "80",
"online": 1,
"status": 0,
"message": [
"成功"
]
},
{
"id": "573",
"ipAddr": "10.88.77.88",
"ipPort": "18080",
"online": 1,
"status": 0,
"message": [
"成功"
]
}
]
}
}
```
## 启动处置任务
+ 请求命令
字段|内容
----|----
Request URI|dispose/task/start
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":3,"cryptoType":0,"timeStamp":1598597142580,"msgContent":"{\"type\":0,\"disposeIp\":\"192.168.50.2\",\"disposeTime\":10,\"flowDirection\":2,\"attackType\":[1,2,3,4,5]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598597142580,
"msgContent": {
"type": 0,
"disposeIp": "192.168.50.2",
"disposeTime": 10,
"flowDirection": 2,
"attackType": [
1, 2, 3, 4, 5
]
}
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":3,"cryptoType":0,"timeStamp":1600741958954,"code":200,"msgContent":"{\"taskId\":\"165\",\"disposeIp\":\"192.168.50.2\",\"expireTime\":\"2020-09-22 10:42:38\",\"status\":0,\"message\":[\"成功\"]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1600741958954,
"code": 200,
"msgContent": {
"taskId": "165",
"disposeIp": "192.168.50.2",
"expireTime": "2020-09-22 10:42:38",
"status": 0,
"message": [
"成功"
]
}
}
```
## 启动多IP处置
+ 请求命令
字段|内容
----|----
Request URI|dispose/task/startMulIp
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":3,"cryptoType":0,"timeStamp":1598597142580,"msgContent":"{\"type\":0,\"mulDisposeIp\":[\"192.168.50.4\",\"192.168.50.3\"],\"disposeTime\":10}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598597142580,
"msgContent": {
"type": 0,
"mulDisposeIp": [
"192.168.50.4",
"192.168.50.3"
],
"disposeTime": 10
}
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":3,"cryptoType":0,"timeStamp":1600742365811,"code":200,"msgContent":"{\"items\":[{\"taskId\":\"166\",\"disposeIp\":\"192.168.50.4\",\"expireTime\":\"2020-09-22 10:49:25\",\"status\":0,\"message\":[\"成功\"]},{\"taskId\":\"167\",\"disposeIp\":\"192.168.50.3\",\"expireTime\":\"2020-09-22 10:49:25\",\"status\":0,\"message\":[\"成功\"]}]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1600742365811,
"code": 200,
"msgContent": {
"items": [
{
"taskId": "166",
"disposeIp": "192.168.50.4",
"expireTime": "2020-09-22 10:49:25",
"status": 0,
"message": [
"成功"
]
},
{
"taskId": "167",
"disposeIp": "192.168.50.3",
"expireTime": "2020-09-22 10:49:25",
"status": 0,
"message": [
"成功"
]
}
]
}
}
```
## 停止指定处置任务
+ 请求命令
字段|内容
----|----
Request URI|dispose/task/stop
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":3,"cryptoType":0,"timeStamp":1598597142580,"msgContent":"{\"taskId\":[\"166\",\"167\",\"168\"]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598597142580,
"msgContent": {
"taskId": [
"166",
"167",
"168"
]
}
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":3,"cryptoType":0,"timeStamp":1600742779563,"code":200,"msgContent":"{\"items\":[{\"taskId\":\"166\",\"disposeDevice\":[\"573\",\"621\"],\"type\":0,\"disposeIp\":\"192.168.50.4\",\"leftTime\":3,\"status\":0,\"message\":[\"成功\"]},{\"taskId\":\"167\",\"disposeDevice\":[\"573\",\"621\"],\"type\":0,\"disposeIp\":\"192.168.50.3\",\"leftTime\":3,\"status\":0,\"message\":[\"成功\"]},{\"taskId\":\"168\",\"status\":30,\"message\":[\"没有该任务\"]}]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1600742779563,
"code": 200,
"msgContent": {
"items": [
{
"taskId": "166",
"disposeDevice": [
"573",
"621"
],
"type": 0,
"disposeIp": "192.168.50.4",
"leftTime": "3",
"status": 0,
"message": [
"成功"
]
},
{
"taskId": "167",
"disposeDevice": [
"573",
"621"
],
"type": 0,
"disposeIp": "192.168.50.3",
"leftTime": "3",
"status": 0,
"message": [
"成功"
]
},
{
"taskId": "168",
"status": 30,
"message": [
"没有该任务"
]
}
]
}
}
```
## 获取全部处置任务
+ 请求命令
字段|内容
----|----
Request URI|dispose/task/taskList
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":1600743307130,"code":200,"msgContent":"{\"curPageNumber\":1,\"pageSize\":10,\"totalItems\":2,\"totalPages\":1,\"status\":0,\"message\":[\"成功\"],\"items\":[{\"taskId\":\"165\",\"accountId\":\"1\",\"disposeCapacity\":0,\"disposeIp\":\"192.168.50.2\",\"createTime\":\"2020-09-22 10:32:38\",\"planEndTime\":\"2020-09-22 10:42:38\",\"endTime\":\"2020-09-22 10:42:38\",\"flowDirection\":2,\"attackType\":\"62\",\"flowBandWidth\":1024,\"currentStatus\":5,\"deviceTask\":[{\"devTaskId\":129,\"devId\":\"573\",\"externId\":\"536\",\"status\":3},{\"devTaskId\":130,\"devId\":\"621\",\"externId\":\"null\",\"status\":3}]},{\"taskId\":\"166\",\"accountId\":\"1\",\"disposeCapacity\":0,\"disposeIp\":\"192.168.50.4\",\"createTime\":\"2020-09-22 10:39:25\",\"planEndTime\":\"2020-09-22 10:49:25\",\"endTime\":\"2020-09-22 10:46:19\",\"flowDirection\":2,\"attackType\":\"8796093022207\",\"flowBandWidth\":1024,\"currentStatus\":4,\"deviceTask\":[{\"devTaskId\":131,\"devId\":\"573\",\"externId\":\"537\",\"status\":3},{\"devTaskId\":132,\"devId\":\"621\",\"externId\":\"null\",\"status\":3}]}]}"}
```json
{
"ver": 3,
"cryptoType": 0,
"timeStamp": 1600743307130,
"code": 200,
"msgContent": {
"curPageNumber": 1,
"pageSize": 10,
"totalItems": 2,
"totalPages": 1,
"status": 0,
"message": [
"成功"
],
"items": [
{
"taskId": "165",
"accountId": "1",
"disposeCapacity": 0,
"disposeIp": "192.168.50.2",
"createTime": "2020-09-22 10:32:38",
"planEndTime": "2020-09-22 10:42:38",
"endTime": "2020-09-22 10:42:38",
"flowDirection": 2,
"attackType": "62",
"flowBandWidth": 1024,
"currentStatus": 5,
"deviceTask": [
{
"devTaskId": "129",
"devId": "573",
"externId": "536",
"status": 3
},
{
"devTaskId": "130",
"devId": "621",
"externId": "null",
"status": 3
}
]
},
{
"taskId": "166",
"accountId": "1",
"disposeCapacity": 0,
"disposeIp": "192.168.50.4",
"createTime": "2020-09-22 10:39:25",
"planEndTime": "2020-09-22 10:49:25",
"endTime": "2020-09-22 10:46:19",
"flowDirection": 2,
"attackType": "8796093022207",
"flowBandWidth": 1024,
"currentStatus": 4,
"deviceTask": [
{
"devTaskId": "131",
"devId": "573",
"externId": "537",
"status": 3
},
{
"devTaskId": "132",
"devId": "621",
"externId": "null",
"status": 3
}
]
}
]
}
}
```
<!-- ## 获取能力节点详细信息
+ 请求命令
字段|内容
----|----
Request URI|dispose/information/node_details
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":2,"cryptoType":0,"timeStamp":1589444539612,"msgContent":"{\"id\":[\"1\",\"123\"]}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1589444539612,
"msgContent":"{\"id\":[\"1\",\"123\"]}"
}
```
+ 响应消息
字段|内容
----|----
Request URI|dispose
Content type|application/json;charset=UTF-8
Body|{"ver":2,"cryptoType":0,"timeStamp":1589444539710,"code":200,"msgContent":"{\"items\":[{\"id\":\"1\",\"type\":0,\"name\":\"中移杭研实验室清洗设备\",\"ip\":\"10.88.77.15\",\"areaCode\":0,\"manufacturer\":\"DPTech\",\"model\":\"UMC\",\"version\":\"Virtual_Device_1.0.0\",\"readme\":\"实验室测试设备\",\"status\":0,\"message\":\"成功\",\"capacity\":[{\"type\":0,\"disposeIp\":\"192.168.3.2-192.168.3.5,192.168.5.2-192.168.5.10,192.168.4.2-192.168.4.5\",\"tolCapacity\":1024,\"usedCapacity\":0},{\"type\":3,\"disposeIp\":\"192.168.2.1,192.168.2.2\",\"tolCapacity\":0,\"usedCapacity\":0}]},{\"id\":\"123\",\"type\":0,\"status\":19,\"message\":\"没有这个设备\"}]}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1589444539710,
"code": 200,
"msgContent":"{\"items\":[{\"id\":\"1\",\"type\":0,\"name\":\"中移杭研实验室清洗设备\",\"ip\":\"10.88.77.15\",\"areaCode\":0,\"manufacturer\":\"DPTech\",\"model\":\"UMC\",\"version\":\"Virtual_Device_1.0.0\",\"readme\":\"实验室测试设备\",\"status\":0,\"message\":\"成功\",\"capacity\":[{\"type\":0,\"disposeIp\":\"192.168.3.2-192.168.3.5,192.168.5.2-192.168.5.10,192.168.4.2-192.168.4.5\",\"tolCapacity\":1024,\"usedCapacity\":0},{\"type\":3,\"disposeIp\":\"192.168.2.1,192.168.2.2\",\"tolCapacity\":0,\"usedCapacity\":0}]},{\"id\":\"123\",\"type\":0,\"status\":19,\"message\":\"没有这个设备\"}]}"
}
```
## 启动处置任务
+ 请求命令
字段|内容
----|----
Request URI|dispose/task/start
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
2020-08-31 08:55:57 +00:00
Body|{"ver":3,"cryptoType":0,"timeStamp":1598597142580,"msgContent":"{\"type\":0, \"disposeIp\":\"192.168.5.3\", \"disposeTime\":10, \"flowDirection\":2, \"attackType\":[1]}"}
```json
{
2020-08-31 08:55:57 +00:00
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598597142580,
"msgContent": {
"type": 0,
"disposeIp": "192.168.5.3",
"disposeTime": 10,
"flowDirection": 2,
"attackType": [
1
]
}
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
2020-08-31 08:55:57 +00:00
Body|{"ver":3,"cryptoType":0,"timeStamp":1598863603232,"code":200,"msgContent":"{\"taskId\":\"75\",\"status\":0,\"message\":[\"成功\"]}"}
```json
{
2020-08-31 08:55:57 +00:00
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598863603232,
"code": 200,
"msgContent": {
"taskId": "75",
"status": 0,
"message": [
"成功"
]
}
}
```
## 停止指定处置任务
+ 请求命令
字段|内容
----|----
Request URI|dispose/task/stop
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
2020-09-01 08:07:04 +00:00
Body|{"ver":3,"cryptoType":0,"timeStamp":1598597142580,"msgContent":"{\"taskId\":[\"81\"]}"}
```json
{
2020-09-01 08:07:04 +00:00
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598597142580,
"msgContent": {
"taskId": [
"81"
]
}
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
2020-09-01 08:07:04 +00:00
Body|{"ver":3,"cryptoType":0,"timeStamp":1598946105967,"code":200,"msgContent":"{\"taskId\":\"81\",\"disposeDevice\":[\"573\"],\"type\":0,\"disposeIp\":\"192.168.5.3\",\"leftTime\":"9",\"status\":0,\"message\":[\"成功\"]}
}
```json
{
2020-09-01 08:07:04 +00:00
"ver": 3,
"cryptoType": 0,
"timeStamp": 1598946105967,
"code": 200,
"msgContent": [
{
"taskId": "81",
"disposeDevice": [
"573"
],
"type": 0,
"disposeIp": "192.168.5.3",
"leftTime": "9",
"status": 0,
"message": [
"成功"
]
}
]
}
```
## 停止某处置IP处置任务
+ 请求命令
字段|内容
----|----
Request URI|dispose/task/stop_ip
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":2,"cryptoType":0,"timeStamp":1587604296988,"msgContent": "{\"items\":[{\"id\":\"1\",\"type\":0,\"disposeIp\":\"192.168.3.3\"}]}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1587604296988,
"msgContent": "{\"items\":[{\"id\":\"1\",\"type\":0,\"disposeIp\":\"192.168.3.3\"}]}"
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":2,"cryptoType":0,"timeStamp":1589422325694,"code":200,"msgContent":"{\"items\":[{\"id\":\"1\",\"taskId\":\"61\",\"type\":0,\"disposeIp\":\"192.168.3.3\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"}]}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1589422325694,
"code": 200,
"msgContent": "{\"items\":[{\"id\":\"1\",\"taskId\":\"61\",\"type\":0,\"disposeIp\":\"192.168.3.3\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"}]}"
}
```
## 停止指定能力节点全部处置任务
+ 请求命令
字段|内容
----|----
Request URI|dispose/task/stop_node
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":2,"cryptoType":0,"timeStamp":1587604296988,"msgContent": "{\"items\":[{\"id\":\"1\",\"type\":0}]}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1587604296988,
"msgContent": "{\"items\":[{\"id\":\"1\",\"type\":0}]}"
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":2,"cryptoType":0,"timeStamp":1589422781798,"code":200,"msgContent":"{\"items\":[{\"id\":\"1\",\"taskId\":\"64\",\"type\":0,\"disposeIp\":\"192.168.5.3\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"},{\"id\":\"1\",\"taskId\":\"62\",\"type\":0,\"disposeIp\":\"192.168.3.4\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"},{\"id\":\"1\",\"taskId\":\"63\",\"type\":0,\"disposeIp\":\"192.168.5.2\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"}]}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1589422781798,
"code": 200,
"msgContent":"{\"items\":[{\"id\":\"1\",\"taskId\":\"64\",\"type\":0,\"disposeIp\":\"192.168.5.3\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"},{\"id\":\"1\",\"taskId\":\"62\",\"type\":0,\"disposeIp\":\"192.168.3.4\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"},{\"id\":\"1\",\"taskId\":\"63\",\"type\":0,\"disposeIp\":\"192.168.5.2\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"}]}"
}
```
## 停止全部处置任务
+ 请求命令
字段|内容
----|----
Request URI|dispose/task/stop_all
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":2,"cryptoType":0,"timeStamp":1587604296988,"msgContent":"{\"type\":0}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1587604296988,
2020-08-28 07:27:42 +00:00
"msgContent":"{\"type\":0}"}
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":2,"cryptoType":0,"timeStamp":1589426197759,"code":200,"msgContent":"{\"items\":[{\"id\":\"1\",\"taskId\":\"66\",\"type\":0,\"disposeIp\":\"192.168.5.7\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"},{\"id\":\"1\",\"taskId\":\"67\",\"type\":0,\"disposeIp\":\"192.168.5.8\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"}]}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1589426197759,
"code": 200,
"msgContent":"{\"items\":[{\"id\":\"1\",\"taskId\":\"66\",\"type\":0,\"disposeIp\":\"192.168.5.7\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"},{\"id\":\"1\",\"taskId\":\"67\",\"type\":0,\"disposeIp\":\"192.168.5.8\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"}]}"
}
```
## 获取指定能力节点全部处置任务
+ 请求命令
字段|内容
----|----
Request URI|dispose/task/get_node
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":2,"cryptoType":0,"timeStamp":1587604296988,"msgContent":"{\"id\": [\"1\",\"123\"],\"type\":0}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1587604296988,
"msgContent":"{\"id\": [\"1\",\"123\"],\"type\":0}"
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":2,"cryptoType":0,"timeStamp":1589431031587,"code":200,"msgContent":"{\"items\":[{\"id\":\"1\",\"taskArray\":[{\"taskId\":\"66\",\"type\":0,\"disposeIp\":\"192.168.5.7\",\"startTime\":1589425731,\"disposeTime\":7200,\"flowAttack\":0,\"flowClean\":0},{\"taskId\":\"67\",\"type\":0,\"disposeIp\":\"192.168.5.8\",\"startTime\":1589425749,\"disposeTime\":7200,\"flowAttack\":0,\"flowClean\":0}],\"status\":0,\"message\":\"成功\"},{\"id\":\"123\",\"status\":30,\"message\":\"没有该任务\"}]}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1589431031587,
"code": 200,
"msgContent":"{\"items\":[{\"id\":\"1\",\"taskArray\":[{\"taskId\":\"66\",\"type\":0,\"disposeIp\":\"192.168.5.7\",\"startTime\":1589425731,\"disposeTime\":7200,\"flowAttack\":0,\"flowClean\":0},{\"taskId\":\"67\",\"type\":0,\"disposeIp\":\"192.168.5.8\",\"startTime\":1589425749,\"disposeTime\":7200,\"flowAttack\":0,\"flowClean\":0}],\"status\":0,\"message\":\"成功\"},{\"id\":\"123\",\"status\":30,\"message\":\"没有该任务\"}]}"
}
```
## 获取处置任务详细信息
+ 请求命令
字段|内容
----|----
Request URI|dispose/task/get
Content type|application/json;charset=UTF-8
Authorization|"Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
Body|{"ver":2,"cryptoType":0,"timeStamp":1587604296988,"msgContent":"{\"taskId\":[\"60\", \"2\"]}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1587604296988,
"msgContent":"{\"taskId\":[\"60\", \"2\"]}"
}
```
+ 响应消息
字段|内容
----|----
Content type|application/json;charset=UTF-8
Body|{"ver":2,"cryptoType":0,"timeStamp":1589436408900,"code":200,"msgContent":"{\"items\":[{\"id\":\"1\",\"taskId\":\"60\",\"type\":0,\"disposeIp\":\"192.168.3.2\",\"startTime\":1589421336,\"disposeTime\":120,\"flowDirection\":2,\"attackType\":[0],\"flowBandWidth\":1024,\"flowAttack\":0,\"flowClean\":0,\"status\":0,\"message\":\"成功\"},{\"id\":\"-1\",\"taskId\":\"2\",\"startTime\":0,\"disposeTime\":0,\"status\":30,\"message\":\"没有该任务\"}]}"}
```json
{
"ver": 2,
"cryptoType": 0,
"timeStamp": 1587604359583,
"code": 200,
"msgContent":"{\"items\":[{\"id\":\"1\",\"taskId\":\"60\",\"type\":0,\"disposeIp\":\"192.168.3.2\",\"startTime\":1589421336,\"disposeTime\":120,\"flowDirection\":2,\"attackType\":[0],\"flowBandWidth\":1024,\"flowAttack\":0,\"flowClean\":0,\"status\":0,\"message\":\"成功\"},{\"id\":\"-1\",\"taskId\":\"2\",\"startTime\":0,\"disposeTime\":0,\"status\":30,\"message\":\"没有该任务\"}]}"
}
``` -->