
URL API can be used with http as well as the encrypted https. Before 2017, this method was called CGI (HTTP GET).
In the context of NETIO products
In NETIO, URL API (http get) refers to a simple way of passing parameters by accessing a URL within the product interface. In this way, it is easy to turn on/off or toggle each individual socket. The disadvantage is that the communication is one-way only. Sockets can be controlled but their state, consumption or voltage cannot be read.
Toggle output 1, the password is “1234”:
http:// 192.168.101.69:1087/netio.cgi?pass=1234&output1=4
Recommendation:
The http-based URL API protocol is not secured in any way. We recommend to use at least a parameter as a password, or to use the HTTPS version.
URL API (http get) can be used to pass data from the web into two processing methods:
-
Standard M2M API interface (URL API)
See the “M2M API Protocols” tab. The parameters in the URL are hard-coded.
For an example, see NETIO AN19 URL API (http GET) protocol to control NETIO power sockets/outlets
-
M2M Active Client: A custom Lua script
For an example, see NETIO AN04 - Remote power socket control by URL (http get handled in Lua script)
Using the URL API
The URL API (http get) can be used in NETIO 4x devices in two ways:
1)Standard M2M
NETIO defines the format of the standard URL API M2M protocol.
See: NETIO AN19 URL API (http GET) protocol to control NETIO power sockets/outlets
This protocol is then used for NETIO 4x, as well as PowerCable REST devices.
>>NETIO specification of the URL API M2M protocol: Download page
2) URL API in Lua (M2M Active Client) on a NETIO 4x
NETIO originally did not support the standard M2M protocol and only allowed this type of control via a Lua script that was uploaded to the NETIO 4x smart sockets device by the customer.
An advantage is that the custom Lua script has full control over the parameters and their interpretation.
See: NETIO AN04 Remote power socket control by URL (http get handled in Lua script)