RPC over HTTP¶
RPC api is reachable with HTTP requests. You should consider using HTTPS to prevent credential to be sent in clear text.
Example¶
You can trigger an RCP using both GET and POST http request.
The following request call RPC Totem.Layer.Steady with arguments :
{
"layer": 0,
"color": "FF00FF"
}
curl 'http://<device-ip>/rpc/Totem.Layer.Steady?layer=0&color="FF00FF"'
Same example using HTTP POST request:
curl http://<device-ip>/rpc/Totem.Layer.Steady -d '{"layer": 0,"color": "FF00FF"}'
Same example using authenticated request:
curl 'http://<device-ip>/rpc/Totem.Layer.Steady?layer=0&color="FF00FF"' --digest -u <username>:<password>
# Or with POST request:
curl http://<device-ip>/rpc/Totem.Layer.Steady -d '{"layer": 0,"color": "FF00FF"}' --digest -u <username>:<password>