NotificationController.http 1009 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ### 获取支持的订阅类型
  2. GET {{host}}/notifications/providers
  3. X-Access-Token: {{token}}
  4. ### 添加,编辑订阅
  5. PATCH {{host}}/notifications/subscribe
  6. X-Access-Token: {{token}}
  7. Content-Type: application/json
  8. {
  9. "subscribeName": "订阅名称,用户输入",
  10. "topicProvider": "device_alarm",
  11. "topicConfig": {
  12. "productId": "*",
  13. "deviceId": "*",
  14. "alarmId": "*"
  15. }
  16. }
  17. ### 查询订阅列表
  18. GET {{host}}/notifications/subscriptions/_query
  19. X-Access-Token: {{token}}
  20. ### 取消订阅
  21. PUT {{host}}/notifications/subscription/1283656437422546944/_disabled
  22. X-Access-Token: {{token}}
  23. ### 开启订阅
  24. PUT {{host}}/notifications/subscription/1283656437422546944/_enabled
  25. X-Access-Token: {{token}}
  26. ### 删除订阅
  27. DELETE {{host}}/notifications/subscription/1283656437422546944
  28. X-Access-Token: {{token}}
  29. ### 查询通知
  30. GET {{host}}/notifications/_query
  31. X-Access-Token: {{token}}
  32. ### 查看通知
  33. GET {{host}}/notifications/1283664641574584320/read
  34. X-Access-Token: {{token}}