Reflect API changes.
This commit is contained in:
@ -15,115 +15,87 @@ Parameters are only provided in a named way (maps).
|
||||
<h4>JSON-RPC 2 format</h4>
|
||||
<div class="box" style="clear: none;"><pre>
|
||||
Request:
|
||||
{"id":"id", "method":"method-name","params":{"param-key-1":"param-value-1", "param-key-2":"param-value-2", "token":"**actual token**"}, "jsonrpc":"2.0"}
|
||||
{"id":"id", "method":"Method-name","params":{"Param-key-1":"param-value-1", "Param-key-2":"param-value-2", "Token":"**actual token**"}, "jsonrpc":"2.0"}
|
||||
Response:
|
||||
{"id":"id","result":{"result-key-1":"result-value-1","result-key-2":"result-value-2"},"jsonrpc":"2.0"}
|
||||
{"id":"id","result":{"Result-key-1":"result-value-1","Result-key-2":"result-value-2"},"jsonrpc":"2.0"}
|
||||
|
||||
</pre></div>
|
||||
</p>
|
||||
<ul>method-name – Description
|
||||
<ul>Request
|
||||
<li>param-key-1 – Description</li>
|
||||
<li>param-key-2 – Description</li>
|
||||
<li>token – Token used for authenticating every request (excluding the 'authenticate' request)</li>
|
||||
<li>Param-key-1 – Description</li>
|
||||
<li>Param-key-2 – Description</li>
|
||||
<li>Token – Token used for authenticating every request (excluding the 'Authenticate' RPC method)</li>
|
||||
</ul>
|
||||
<ul>Response
|
||||
<li>result-key-1 – Description</li>
|
||||
<li>result-key-2 – Description</li>
|
||||
<li>Result-key-1 – Description</li>
|
||||
<li>Result-key-2 – Description</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h4>Implemented methods</h4>
|
||||
<ul>authenticate – Creates and returns an authentication token used for further communication.
|
||||
<ul>Authenticate – Creates and returns an authentication token used for further communication.
|
||||
<ul>Request
|
||||
<li>password – [String] The password used for authenticating against the remote server.</li>
|
||||
<li>Password – [String] The password used for authenticating against the remote server.</li>
|
||||
</ul>
|
||||
<ul>Response
|
||||
<li>token – [String] The token used for further communication.</li>
|
||||
<li>Token – [String] The token used for further communication.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>echo – Echoes the value of the echo key, used for debugging and testing.
|
||||
<ul>Echo – Echoes the value of the echo key, used for debugging and testing.
|
||||
<ul>Request
|
||||
<li>echo – [String] Value will be returned in response.</li>
|
||||
<li>token – [String]Token used for authenticating the client. Is provided by the server via the 'authenticate' request.</li>
|
||||
<li>Echo – [String] Value will be returned in response.</li>
|
||||
<li>Token – [String]Token used for authenticating the client. Is provided by the server via the 'Authenticate' RPC method.</li>
|
||||
</ul>
|
||||
<ul>Response
|
||||
<li>result – [String] Value of the key 'echo' in the request.</li>
|
||||
<li>Result – [String] Value of the key 'echo' in the request.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>getRate – Fetches rateStat from router statManager. Creates stat if not already created.
|
||||
<ul>GetRate – Fetches rateStat from router statManager. Creates stat if not already created.
|
||||
<ul>Request
|
||||
<li>rateStat – [String] Determines which rateStat to fetch, see <a href="ratestats.html">ratestats</a>.</li>
|
||||
<li>period – [double] Determines which period a stat is fetched for.</li>
|
||||
<li>token – [String] Token used for authenticating the client. Is provided by the server via the 'authenticate' request.</li>
|
||||
<li>Stat – [String] Determines which rateStat to fetch, see <a href="ratestats.html">ratestats</a>.</li>
|
||||
<li>Period – [double] Determines which period a stat is fetched for.</li>
|
||||
<li>Token – [String] Token used for authenticating the client. Is provided by the server via the 'Authenticate' RPC method.</li>
|
||||
</ul>
|
||||
<ul>Response
|
||||
<li>result – [double] Returns the average value for the reuested rateStat and period.</li>
|
||||
<li>Result – [double] Returns the average value for the reuested rateStat and period.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>getNetworkInfo – Fetches various network related information. Ports, addresses etc.
|
||||
<ul>NetworkInfo – Fetches or sets various network related information. Ports, addresses etc.
|
||||
<ul>Request
|
||||
<li>*all – [value-ignored] Returns all of the below values fetched by the options below.</li>
|
||||
<li>*i2p.router.net.ntcp.port – [value-ignored] What port is used for the TCP transport.</li>
|
||||
<li>*i2p.router.net.ntcp.hostname – [value-ignored] What hostname is used for the TCP transport.</li>
|
||||
<li>*i2p.router.net.ntcp.autoip – [value-ignored] Use automatically detected ip for TCP transport.</li>
|
||||
<li>*i2p.router.net.ssu.port – [value-ignored] What port is used for the UDP transport.</li>
|
||||
<li>*i2p.router.net.ssu.hostname – [value-ignored] What hostname is used for the UDP transport.</li>
|
||||
<li>*i2p.router.net.ssu.detectedip – [value-ignored] What IP address has the UDP transport detected.</li>
|
||||
<li>*i2p.router.net.ssu.autoip – [value-ignored] Which methods should be used for detecting the ip address of the UDP transport.</li>
|
||||
<li>*i2p.router.net.upnp – [value-ignored] Is UPNP enabled.</li>
|
||||
<li>*i2p.router.net.bw.share – [value-ignored] How many percent of bandwidth is usable for participating tunnels.</li>
|
||||
<li>*i2p.router.net.bw.in – [value-ignored] How many KB/s of inboud bandwidth is allowed.</li>
|
||||
<li>*i2p.router.net.bw.out – [value-ignored] How many KB/s of outbound bandwidth is allowed.</li>
|
||||
<li>*i2p.router.net.laptopmode – [value-ignored] Is laptop mode enabled (cChange router identity and UDP port when IP changes ).</li>
|
||||
<li>token – [String] Token used for authenticating the client. Is provided by the server via the 'authenticate' request.</li>
|
||||
<li>*i2p.router.net.ntcp.port – [String] What port is used for the TCP transport. If null is submitted, current setting will be returned.</li>
|
||||
<li>*i2p.router.net.ntcp.hostname – [String] What hostname is used for the TCP transport. If null is submitted, current setting will be returned.</li>
|
||||
<li>*i2p.router.net.ntcp.autoip – [String] Use automatically detected ip for TCP transport. If null is submitted, current setting will be returned.</li>
|
||||
<li>*i2p.router.net.ssu.port – [String] What port is used for the UDP transport. If null is submitted, current setting will be returned.</li>
|
||||
<li>*i2p.router.net.ssu.hostname – [String] What hostname is used for the UDP transport. If null is submitted, current setting will be returned.</li>
|
||||
<li>*i2p.router.net.ssu.autoip – [String] Which methods should be used for detecting the ip address of the UDP transport. If null is submitted, current setting will be returned.</li>
|
||||
<li>*i2p.router.net.ssu.detectedip – [null] What ip has been detected by the UDP transport.</li>
|
||||
<li>*i2p.router.net.upnp – [String] Is UPNP enabled. If null is submitted, current setting will be returned.</li>
|
||||
<li>*i2p.router.net.bw.share – [String] How many percent of bandwidth is usable for participating tunnels. If null is submitted, current setting will be returned.</li>
|
||||
<li>*i2p.router.net.bw.in – [String] How many KB/s of inbound bandwidth is allowed. If null is submitted, current setting will be returned.</li>
|
||||
<li>*i2p.router.net.bw.out – [String] How many KB/s of outbound bandwidth is allowed. If null is submitted, current setting will be returned.</li>
|
||||
<li>*i2p.router.net.laptopmode – [String] Is laptop mode enabled (change router identity and UDP port when IP changes ). If null is submitted, current setting will be returned.</li>
|
||||
<li>Token – [String] Token used for authenticating the client. Is provided by the server via the 'Authenticate' RPC method. If null is submitted, current setting will be returned.</li>
|
||||
</ul>
|
||||
<ul>Response
|
||||
<li>i2p.router.net.ntcp.port – [String] What port is used for the TCP transport.</li>
|
||||
<li>i2p.router.net.ntcp.hostname – [String] What hostname is used for the TCP transport.</li>
|
||||
<li>i2p.router.net.ntcp.autoip – [String] Use automatically detected ip for TCP transport.</li>
|
||||
<li>i2p.router.net.ssu.port – [String] What port is used for the UDP transport.</li>
|
||||
<li>i2p.router.net.ssu.hostname – [String] What hostname is used for the UDP transport.</li>
|
||||
<li>i2p.router.net.ssu.detectedip – [String] What IP address has the UDP transport detected.</li>
|
||||
<li>i2p.router.net.ssu.autoip – [String] Which methods should be used for detecting the ip address of the UDP transport.</li>
|
||||
<li>i2p.router.net.upnp – [String] Is UPNP enabled.</li>
|
||||
<li>i2p.router.net.bw.share – [String] How many percent of bandwidth is usable for participating tunnels.</li>
|
||||
<li>i2p.router.net.bw.in – [String] How many KB/s of inboud bandwidth is allowed.</li>
|
||||
<li>i2p.router.net.bw.out – [String] How many KB/s of outbound bandwidth is allowed.</li>
|
||||
<li>i2p.router.net.laptopmode – [String] Is laptop mode enabled (cChange router identity and UDP port when IP changes ).</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>setNetworkInfo – Fetches various network related information. Ports, addresses etc.
|
||||
<ul>Request
|
||||
<li>*i2p.router.net.ntcp.port – [value-ignored] What port is used for the TCP transport.</li>
|
||||
<li>*i2p.router.net.ntcp.hostname – [value-ignored] What hostname is used for the TCP transport.</li>
|
||||
<li>*i2p.router.net.ntcp.autoip – [value-ignored] Use automatically detected ip for TCP transport.</li>
|
||||
<li>*i2p.router.net.ssu.port – [value-ignored] What port is used for the UDP transport.</li>
|
||||
<li>*i2p.router.net.ssu.hostname – [value-ignored] What hostname is used for the UDP transport.</li>
|
||||
<li>*i2p.router.net.ssu.autoip – [value-ignored] Which methods should be used for detecting the ip address of the UDP transport.</li>
|
||||
<li>*i2p.router.net.upnp – [value-ignored] Is UPNP enabled.</li>
|
||||
<li>*i2p.router.net.bw.share – [value-ignored] How many percent of bandwidth is usable for participating tunnels.</li>
|
||||
<li>*i2p.router.net.bw.in – [value-ignored] How many KB/s of inboud bandwidth is allowed.</li>
|
||||
<li>*i2p.router.net.bw.out – [value-ignored] How many KB/s of outbound bandwidth is allowed.</li>
|
||||
<li>*i2p.router.net.laptopmode – [value-ignored] Is laptop mode enabled (change router identity and UDP port when IP changes ).</li>
|
||||
<li>token – [String] Token used for authenticating the client. Is provided by the server via the 'authenticate' request.</li>
|
||||
</ul>
|
||||
<ul>Response
|
||||
<li>i2p.router.net.ntcp.port – [boolean] If the port used for the TCP transport was changed.</li>
|
||||
<li>i2p.router.net.ntcp.hostname – [boolean] If the hostname is used for the TCP transport was changed.</li>
|
||||
<li>i2p.router.net.ntcp.autoip – [boolean] If the method for automatically detecting ip for TCP transport was changed.</li>
|
||||
<li>i2p.router.net.ssu.port – [boolean] If the port is used for the UDP transport was changed.</li>
|
||||
<li>i2p.router.net.ssu.hostname – [boolean] If the hostname is used for the UDP transport was changed.</li>
|
||||
<li>i2p.router.net.ssu.autoip – [boolean] If the methods used for detecting the ip address of the UDP transport were changed.</li>
|
||||
<li>i2p.router.net.upnp – [boolean] If the UPNP setting was changed.</li>
|
||||
<li>i2p.router.net.bw.share – [boolean] If how many percent of bandwidth is usable for participating tunnels was changed.</li>
|
||||
<li>i2p.router.net.bw.in – [boolean] If how many KB/s of inboud bandwidth is allowed was changed.</li>
|
||||
<li>i2p.router.net.bw.out – [boolean] If how many KB/s of outbound bandwidth is allowed was changed.</li>
|
||||
<li>i2p.router.net.laptopmode – [boolean] If the laptop mode (change router identity and UDP port when IP changes ) was changed.</li>
|
||||
<li>restart.needed – [boolean] Is a restart needed for the new settings to be used.</li>
|
||||
<li>**i2p.router.net.ntcp.port – [String] If requested, returns the port used for the TCP transport.</li>
|
||||
<li>**i2p.router.net.ntcp.hostname – [String] If requested, returns the hostname used for the TCP transport.</li>
|
||||
<li>**i2p.router.net.ntcp.autoip – [String] If requested, returns the method used for automatically detecting ip for the TCP transport.</li>
|
||||
<li>**i2p.router.net.ssu.port – [String] If requested, returns the port used for the UDP transport.</li>
|
||||
<li>**i2p.router.net.ssu.hostname – [String] If requested, returns the hostname used for the UDP transport.</li>
|
||||
<li>**i2p.router.net.ssu.autoip – [String] If requested, returns methods used for detecting the ip address of the UDP transport.</li>
|
||||
<li>**i2p.router.net.ssu.detectedip – [String] If requested, returns what ip has been detected by the UDP transport.</li>
|
||||
<li>**i2p.router.net.upnp – [String] If requested, returns the UPNP setting.</li>
|
||||
<li>**i2p.router.net.bw.share – [String] If requested, returns how many percent of bandwidth is usable for participating tunnels.</li>
|
||||
<li>**i2p.router.net.bw.in – [String] If requested, returns how many KB/s of inbound bandwidth is allowed.</li>
|
||||
<li>**i2p.router.net.bw.out – [String] If requested, returns how many KB/s of outbound bandwidth is allowed.</li>
|
||||
<li>**i2p.router.net.laptopmode – [String] If requested, returns the laptop mode.</li>
|
||||
<li>SettingsSaved – [String] Have the provided settings been saved.</li>
|
||||
<li>RestartNeeded – [String] Is a restart needed for the new settings to be used.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<p>* denotes an optional value.</p>
|
||||
<p>** denotes a possibly occuring return value</p>
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user