Read & Write

Read Tag

POST /api/v2/read

Request Headers

Content—Type application/json

Authorization Bearer <token>

Response Status

  • 200

Body

  1. {
  2. //node name
  3. "node": "modbus-tcp-1",
  4. //group name
  5. "group": "config_modbus_tcp_sample_2"
  6. }

Response

  1. {
  2. "tags": [
  3. {
  4. //tag nmae
  5. "name": "data1",
  6. //tag value
  7. "value": 1,
  8. },
  9. {
  10. "name": "data2",
  11. "error": 2014
  12. },
  13. {
  14. "name": "data3",
  15. "value": true,
  16. }
  17. ]
  18. }

TIP

The value is displayed only when the value is read correctly, when the value is read incorrectly, the error code is displayed, not the value.

Write Tag

POST /api/v2/write

Request Headers

Content-Type application/json

Authorization Bearer <token>

Response Status

  • 200 OK

Body

  1. {
  2. "node": "modbus-tcp-1",
  3. "group": "config_modbus_tcp_sample_2",
  4. "tag": "tag1",
  5. "value": 1234
  6. }

Response

  1. {
  2. "error": 0
  3. }