Changes

Line 224: Line 224:  
To login to the router via JSON-RPC you must first obtain a Session ID. To do so, open the '''Terminal''' app and execute this command:
 
To login to the router via JSON-RPC you must first obtain a Session ID. To do so, open the '''Terminal''' app and execute this command:
   −
   curl -d "{ \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"call\", \"params\": [ \"00000000000000000000000000000000\", \"session\", \"login\", { \"username\": \"root\", \"password\": \"admin01\"  } ] }" http://192.168.1.1/ubus   
+
   curl -d "{ \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"call\", \"params\": [ \"00000000000000000000000000000000\", \"session\", \"login\", { \"username\": \"root\", \"password\": \"<span style=color:orange>admin01</span>\"  } ] }" http://<span style=color:green>192.168.1.1</span>/ubus   
 +
 
 +
The section highlighted in orange is the router's admin password. admin01 is the default value, replace it with your router's password. The address highlighted in green is the router's IP address. Replace this value with your router's IP. If you're trying to reach the router from [[LAN]], use the local IP address (default: '''192.168.1.1'''), if you're trying to reach the router from [[WAN]], use the router's WAN IP address.
 +
 
 +
 
 +
[[Image:Configuration examples json-rpc terminal get id.png]]
 +
 
 +
The picture above depicts the process of obtaining a Session ID. The ID itself is highlighted with a blue rectangle. Copy this ID ass you will need it to authenticate yourself when using other commands.
       
</font>
 
</font>

Navigation menu