device.http 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #
  2. # Copyright 2016-present the original author or authors.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # https://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. ### 新增 Device
  17. #/manager/device/add
  18. POST http://{{dc3-manager}}/manager/device/add
  19. Accept: */*
  20. Content-Type: application/json
  21. Cache-Control: no-cache
  22. {
  23. "multi": false,
  24. "profileIds": [
  25. "1538467573683765249"
  26. ],
  27. "driverId": "1519329568578621442",
  28. "name": "虚拟设备"
  29. }
  30. ### 修改 Device
  31. #/manager/device/update
  32. POST http://{{dc3-manager}}/manager/device/update
  33. Accept: */*
  34. Content-Type: application/json
  35. Cache-Control: no-cache
  36. {
  37. "id": 1,
  38. "name": "测试设备",
  39. "profileId": -1,
  40. "groupId": -1,
  41. "description": "测试设备"
  42. }
  43. ### 根据 ID 查询 Device
  44. #/manager/device/id/:id
  45. GET http://{{dc3-manager}}/manager/device/id/1
  46. Accept: */*
  47. Cache-Control: no-cache
  48. ### 查询 Device 状态
  49. #/manager/device/driverStatus,支持name模糊查询,code\driverStatus\profileId\groupId精准查询
  50. POST http://{{dc3-manager}}/manager/device/driverStatus
  51. Accept: */*
  52. Content-Type: application/json
  53. Cache-Control: no-cache
  54. {
  55. "name": "",
  56. "page": {
  57. "current": 1,
  58. "orders": [
  59. {
  60. "column": "id",
  61. "asc": false
  62. }
  63. ]
  64. }
  65. }
  66. ### 分页查询 Device
  67. #/manager/device/list,支持name模糊查询,code\driverStatus\profileId\groupId精准查询
  68. POST http://{{dc3-manager}}/manager/device/list
  69. Accept: */*
  70. Content-Type: application/json
  71. Cache-Control: no-cache
  72. {
  73. "name": "",
  74. "page": {
  75. "current": 1,
  76. "orders": [
  77. {
  78. "column": "id",
  79. "asc": false
  80. }
  81. ]
  82. }
  83. }
  84. ### 根据 ID 删除 Device
  85. #/manager/device/delete/:id
  86. POST http://{{dc3-manager}}/manager/device/delete/1
  87. Accept: */*
  88. Content-Type: application/json
  89. Cache-Control: no-cache
  90. ###