
###设备列表
POST {{baseUrl}}/device/list
Content-Type: application/json

{
  "page": 1,
  "size": 10
}


###设备更新与保存
POST {{baseUrl}}/device/stopOrStartComsumeQueue
Authorization: {{authToken}}
Content-Type: application/json

{
  "id": 60,
  "enabled": 0
}

###设备更新与保存
POST {{baseUrl}}/device/save
Authorization: {{authToken}}
Content-Type: application/json

{
  "deviceName": "gosxaj11",
  "deviceCode": "ksdmo711",
  "deviceType": 1,
  "deviceMac": "a3ku15",
  "ip": "5ffz2e",
  "centernum": "pcou8p",
  "port": "0ujj4h",
  "siteNum": "8aw47p",
  "deviceFirmId": 922,
  "deviceFirmname": "cwzu1n",
  "deviceOnlineStatus": 0,
  "status": 0,
  "deviceRemark": "plxklr",
  "onlineTime": "1646755200000",
  "offlineTime": "1646755200000"
}

> {%
client.global.set("Device_id", JSON.parse(response.body).data.id);
%}

###设备查看
POST {{baseUrl}}/device/info
Accept: application/json
Content-Type: application/json

{
  "id": "3"
}

###设备查看
POST {{baseUrl}}/device/maplist
Accept: application/json
Content-Type: application/json

{
  "siteId": 1
}


###设备告警统计查看
POST {{baseUrl}}/device/alarm/info/stats
Accept: application/json
Content-Type: application/json

{
  "siteId": 1
}

###设备告警统计查看
POST {{baseUrl}}/device/alarm/info/statlist
Accept: application/json
Content-Type: application/json

{
  "siteId": 1
}


###设备编辑
GET {{baseUrl}}/device/edit?id={{Device_id}}
Accept: application/json


###设备删除
GET {{baseUrl}}/device/delete?id={{Device_id}}
Accept: application/json




###getToken
POST {{baseUrl}}/api/getToken
Content-Type: application/json

{
  "loginName": "admin",
  "password": "admin"
}

> {%
client.global.set("authToken", JSON.parse(response.body).data);
%}



###注册设备   D8-BB-C1-D7-E2-E3
POST {{baseUrl}}/api/register
Content-Type: application/json

{
  "deviceCode": "3C-4E-56-51-7E-72"
}

###获取产品与
GET {{baseUrl}}/api/deviceInit
Accept: application/json

###设备新增或更新
POST {{baseUrl}}/api/deviceUpdate
Content-Type: application/json

{"deviceCode":"56-53-54-79-20-wq","productId":7,"siteId":1,"source":1}

###设备新增
POST {{baseUrl}}/api/receive
Authorization: {{authToken}}
Content-Type: application/json

{
  "deviceCode": "1",
  "deviceMac": "1",
  "deviceName": "1",
  "deviceRemark": "",
  "ip": "",
  "port": "",
  "productCode": "ledtp",
  "receiveMethod": 1,
  "siteCode": "513426000000-0001",
  "siteId": 3,
  "siteName": "会东县行政审批局"
}

###设备更新
POST {{baseUrl}}/api/receive
Content-Type: application/json

{"deviceCode":"94-a4-08-ea-16-3e","deviceInBuilding":0,"deviceInFloor":0,"deviceMac":"94-a4-08-ea-16-3e","deviceName":"一楼A03","deviceRemark":"","ip":"","port":"","productCode":"hjq","receiveMethod":2,"resolution":"","siteCode":"510921000000-0001","siteId":1,"siteName":"蓬溪县政务服务中心"}




###设备版本检查
POST {{baseUrl}}/api/checkVersion
Content-Type: application/json

{
  "deviceCode": "50-41-1C-F8-A7-A8"
}

###设备上报
POST {{baseUrl}}/api/upload
Content-Type: application/json
Authorization: {{authToken}}

{
  "deviceCode": "a109",
  "action": "upload"
}


###设备消息
POST {{baseUrl}}/api/callback
Content-Type: application/json

[
  {
    "data": "xxxx",
    "deviceCode": "a102",
    "messageType": "aaaa",
    "timestamp": 1654656951795
  },
  {
    "data": "bbbbbb",
    "deviceCode": "a102",
    "messageType": "bbbb",
    "timestamp": 1654656951795
  }
]



###设备上报
POST {{baseUrl}}/test/upload?deviceId=2
Content-Type: application/json

{
  "req": 1
}


###siteTree
POST {{baseUrl}}/test/siteTree
Content-Type: application/json

{}
