Advertisement
Guest User

Untitled

a guest
May 7th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.56 KB | None | 0 0
  1. ////////
  2. // api's on Base Tab
  3. ////////
  4.  
  5. //get all settings for base tab
  6. GET /api/basesettings
  7. {}
  8. Reply:
  9. {
  10.   "rabbitMqConnectionString": "host=myServer;virtualHost=myVirtualHost;username=mike;password=topsecret",
  11.   "serviceDbConnectionString": "User ID=shmadmin;Password=shmadmin;Host=postgres;Port=5432;Database=shm;Pooling=false;",
  12.   "versionNumber": 2,
  13.   "isConfigured": true,
  14.   "port":8022
  15. }
  16.  
  17. //pushes new settings to service. Restart is needed to apply them.
  18. POST /api/basesettings
  19. {
  20.   "rabbitMqConnectionString": "host=myServer;virtualHost=myVirtualHost;username=mike;password=topsecret",
  21.   "serviceDbConnectionString": "User ID=shmadmin;Password=shmadmin;Host=postgres;Port=5432;Database=shm;Pooling=false;",
  22.   "port":8022
  23. }
  24. Reply:
  25. 200 OK
  26.  
  27. //Restart service
  28. POST /api/control
  29. {
  30.     "state":"Restart"
  31. }
  32. Reply:
  33. 200 OK
  34.  
  35. //start service
  36. POST /api/control
  37. {
  38.     "state":"Start"
  39. }
  40. Reply:
  41. 200 OK
  42.  
  43. //Stop service
  44. POST /api/control
  45. {
  46.     "state":"Stop"
  47. }
  48. Reply:
  49. 200 OK
  50.  
  51. ////////
  52. // api's on Main Tab
  53. ////////
  54. GET /api/rm
  55. {
  56.   "pageNumber": 0
  57.   "itemCount": 15
  58. }
  59. Reply:
  60. {
  61.   "AgentSystemId": "str",
  62.   "AgentSensorId": "stri",
  63.   "AgentMeasuringValueId": "strin",
  64.   "ValueRule": "string",
  65.   "SensorId": 5
  66. }
  67.  
  68. POST /api/rm
  69. {
  70.   "AgentSystemId": null,
  71.   "AgentSensorId": "",
  72.   "AgentMeasuringValueId": "Vaoijfoisdgusiodg",
  73.   "ValueRule": "",
  74.   "SensorId": 5
  75. }
  76. Reply (sends back serialized created object):
  77. {
  78.   "AgentSystemId": null,
  79.   "AgentSensorId": "",
  80.   "AgentMeasuringValueId": "Vaoijfoisdgusiodg",
  81.   "ValueRule": "",
  82.   "SensorId": 5
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement