Changes

Line 406: Line 406:  
This command ('''file''', '''read''', highlighted in red) is an alternative to the Linux '''cat''' command we see used in the '''[[Monitoring_via_JSON-RPC#Getting_router_parameters|Getting router paramaters]]''' section of this guide. All you need is to specify the path (in this case '''/etc/version''', highlighted in red) to the file that you wish to read.
 
This command ('''file''', '''read''', highlighted in red) is an alternative to the Linux '''cat''' command we see used in the '''[[Monitoring_via_JSON-RPC#Getting_router_parameters|Getting router paramaters]]''' section of this guide. All you need is to specify the path (in this case '''/etc/version''', highlighted in red) to the file that you wish to read.
   −
===Restart router===
+
===Reboot===
 +
 
 +
'''Windows:'''
 +
{
 +
    "jsonrpc":"2.0","id":1,"method":"call","params":
 +
    [
 +
        "5cd4b143b182c07bc578ae3310d6280e","file","exec",
 +
        {
 +
            "command":"<span style=color:red>reboot</span>","params":["<span style=color:red>config</span>"]
 +
        }
 +
    ]
 +
}
 +
 
 +
'''Linux:'''
 +
curl -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"call\",\"params\":[\"5cd4b143b182c07bc578ae3310d6280e\",\"file\",\"exec\",{\"command\":\"<span style=color:red>reboot</span>\",\"params\":[\"<span style=color:red>config</span>\"]}]}" http://<span style=color:black>192.168.1.1</span>/ubus
 +
 
 +
'''Response:'''
 +
 
 +
The success response for this command is an empty message. If the response contains no data, the command was executed successfully.
    
===Set mobile data limit===
 
===Set mobile data limit===

Navigation menu