2011-06-27 11:26:59 +00:00
{% extends "_layout.html" %}
{% block title %}Licenses{% endblock %}
{% block content %}
< h1 > I2PControl - Remote Control Service< / h1 >
< p > I2P enables a < a href = "http://en.wikipedia.org/wiki/JSON-RPC" > JSONRPC2< / a > interface via the plugin I2PControl.
The aim of the interface is to provide simple way to interface with a running I2P node. A client, itoopie, has been developed in parallel.
The JSONRPC2 implementation for the client as well as the plugin is provided by the java libraries < a href = "http://software.dzhuvinov.com/json-rpc-2.0.html" > JSON-RPC 2.0< / a > .
A list of implementations of JSON-RPC for various languages can be found at < a href = "http://json-rpc.org/wiki/implementations" > the JSON-RPC wiki< / a > .
< / p >
< h2 > API< / h2 >
< p >
Parameters are only provided in a named way (maps).
< h4 > JSON-RPC 2 format< / h4 >
2011-07-05 12:56:15 +00:00
< div class = "box" style = "clear: none;" > < pre >
2011-06-27 11:26:59 +00:00
Request:
2011-07-05 12:56:15 +00:00
{"id":"id", "method":"method-name","params":{"param-key-1":"param-value-1", "param-key-2":"param-value-2", "token":"**actual token**"}, "jsonrpc":"2.0"}
2011-06-27 11:26:59 +00:00
Response:
{"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 >
2011-07-05 12:56:15 +00:00
< li > token – Token used for authenticating every request (excluding the 'authenticate' request)< / li >
2011-06-27 11:26:59 +00:00
< / ul >
< ul > Response
< li > result-key-1 – Description< / li >
< li > result-key-2 – Description< / li >
< / ul >
< / ul >
< h4 > Implemented methods< / h4 >
2011-07-05 12:56:15 +00:00
< 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 >
< / ul >
< ul > Response
< li > token – [String] The token used for further communication.< / li >
< / ul >
< / ul >
2011-06-27 11:26:59 +00:00
< ul > echo – Echoes the value of the echo key, used for debugging and testing.
< ul > Request
2011-07-05 12:56:15 +00:00
< 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 >
2011-06-27 11:26:59 +00:00
< / ul >
< ul > Response
2011-07-05 12:56:15 +00:00
< li > result – [String] Value of the key 'echo' in the request.< / li >
2011-06-27 11:26:59 +00:00
< / ul >
< / ul >
< ul > getRate – Fetches rateStat from router statManager. Creates stat if not already created.
< ul > Request
2011-07-05 12:56:15 +00:00
< li > rateStat – [String] Determines which rateStat to fetch, see < a href = "TODO" > TODO< / a > .< / li >
2011-06-27 11:26:59 +00:00
< li > period – [double] Determines which period a stat is fetched for.< / li >
2011-07-05 12:56:15 +00:00
< li > token – [String] Token used for authenticating the client. Is provided by the server via the 'authenticate' request.< / li >
2011-06-27 11:26:59 +00:00
< / ul >
< ul > Response
< li > result – [double] Returns the average value for the reuested rateStat and period.< / li >
< / ul >
< / ul >
{% endblock %}