JSON API

From wiki.netio-products.com
Jump to navigation Jump to search

JSON / HTTP(s) protocol can be treated as file-based M2M API protocol, where the NETIO device is a HTTP(s) server and the client downloads or uploads one text file document in the json format to control the NETIO power outputs (230V power sockets or IEC-320 power outlets 110/230V).

  • If device support metering, the protocol also includes energy metering values.
  • The JSON protocol must be enabled first in the WEB configuration of the respective device. For details, see the “NETIO WEB configuration” chapter.
  • This protocol is HTTP(s) based. If you want use different port than is used for device web configuration, you can enable and use the M2M HTTP(s) port
  • Username and password to access the file is hidden in the HTML header. There can be different username & password for the read and write access.
  • With write (netio.json file upload by http post) the device send you back the current (updated) json answer content in the same structure as the netio.json file.


JavaScript Object Notation (JSON) is a platform-independent data transfer format. JSON is popular thanks to its simplicity and human-readability. Its advantages include platform independence and unified format, at the cost of data volume.

https://www.netio-products.com/en/glossary/json-over-https


Standard NETIO JSON API

Download the Protocol description in PDF: NETIO JSON API

AN21: JSON HTTP(S) protocol to control NETIO 110/230V power sockets (3x REST API)

The AN21 Application Note shows how to access measurements and control electrical sockets on a NETIO 4x device from third-party applications using the JSON protocol. AN21 demonstrates several different ways to control NETIO power sockets by transferring a netio.json file over http. The first method uses the “Device HTTP(s) File Upload” tool in the device’s web interface. The second method transfers the JSON file using a Chrome browser extension. The third method uses CURL (command-line tool) to transfer files over http.

https://www.netio-products.com/en/application-notes/an21-json-https-protocol-to-control-netio-110230v-power-sockets-3x-rest-api

Supported devices: