Changes

Line 15: Line 15:  
This section describes how to use JSON-RPC with a Windows operating system. If you're using a Linux OS, jump to this section of the guide: '''[[Monitoring_via_JSON-RPC#Using_JSON-RPC_with_Linux_OS|JSON-RPC with Linux]]'''
 
This section describes how to use JSON-RPC with a Windows operating system. If you're using a Linux OS, jump to this section of the guide: '''[[Monitoring_via_JSON-RPC#Using_JSON-RPC_with_Linux_OS|JSON-RPC with Linux]]'''
   −
===Obtaining a session ID===
+
===HTTP POST===
 
----
 
----
 
To login to the router via JSON-RPC you will need software capable of sending '''HTTP POST''' requests to the router. The simplest solution is to install an add-on similar to Firefox’s "'''Poster'''" (download link '''[https://addons.mozilla.org/en-US/firefox/addon/poster/ here]'''). The add-on can then be launched it by opening the Mozilla Firefox browser and pressing '''Ctrl+Alt+P'''.  
 
To login to the router via JSON-RPC you will need software capable of sending '''HTTP POST''' requests to the router. The simplest solution is to install an add-on similar to Firefox’s "'''Poster'''" (download link '''[https://addons.mozilla.org/en-US/firefox/addon/poster/ here]'''). The add-on can then be launched it by opening the Mozilla Firefox browser and pressing '''Ctrl+Alt+P'''.  
Line 24: Line 24:     
The rest of this guide will focus on Firefox's "Poster", but feel free to follow it step-by-step whichever method you chose as all the steps bellow apply to "Chrome Poster" and similar add-ons as well.
 
The rest of this guide will focus on Firefox's "Poster", but feel free to follow it step-by-step whichever method you chose as all the steps bellow apply to "Chrome Poster" and similar add-ons as well.
 +
 +
===Obtaining a session ID===
 
----
 
----
First, you must obtain a '''Session ID'''. In order to do so, you must send an HTTP POST request to the router asking for it. Enter the router's IP address into the URL field (use this format: '''http://192.168.1.1/ubus'''). Or if you wish to log in remotely, enter the '''WAN''' IP address instead.  
+
First, you must obtain a '''Session ID'''. In order to do so, you must send an HTTP POST request to the router asking for it. Enter the router's IP address into the URL field (use this format: '''http://192.168.1.1/ubus''' ; use LAN IP for local access, WAN IP for remote access). Enter the router's user name and password into the '''User Auth.''' field. Then paste the following command into the '''Content to send''' field and click '''Post''':
 
  −
Next, enter the router's user name and password into the '''User Auth.''' field. Then paste this command into the '''Content to send''' field and click '''Post''':
  −
 
      
  {  
 
  {  
Line 39: Line 38:  
     ]
 
     ]
 
  }
 
  }
The section highlighted in orange is the router's admin password which by default is admin01. Replace this part with your own router's password.
+
The section highlighted in orange is the router's admin password which by default is admin01. Replace this part with your own router's password. Here's how everything should look before sending:
 
  −
 
  −
[[Image:Configuration examples json-rpc firefox poster get session id 1.PNG]]
  −
 
      +
[[File:Configuration examples json-rpc firefox poster get session id 1 v1.png]]
    
Once you've issued the command, a Response window containing your Session ID should appear:
 
Once you've issued the command, a Response window containing your Session ID should appear: