Changes

Line 220: Line 220:  
===Obtaining a session ID===
 
===Obtaining a session ID===
 
----
 
----
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, you must send an '''HTTP POST''' request to the router. open the '''Terminal''' app and execute this command:
    
  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   
 
  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