Skip to content

Commit

Permalink
Documentation and changelog entry on new /connection API
Browse files Browse the repository at this point in the history
  • Loading branch information
andrevmatos authored and LefterisJP committed Sep 15, 2017
1 parent 7266046 commit f2c4667
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Changelog
=========


* :feature:`921` Add ``/api/1/connection`` API endpoint returning information about all connected token networks.
* :bug:`1011` Remove ``settled`` attribute from the NettingChannel smart contract.
* :release:`0.1.0 <2017-09-12>`
* :feature:`-` This is the `Raiden Developer Preview <https://github.com/raiden-network/raiden/releases/tag/v0.1.0>`_ release. Introduces a raiden test network on ropsten, the API and all the basic functionality required to use Raiden in Dapps. For more information read the `blog post <https://medium.com/@raiden_network/raiden-network-developer-preview-dad83ec3fc23>`_ or the `documentation of v0.1.0 <http://raiden-network.readthedocs.io/en/v0.1.0/>`_.
46 changes: 46 additions & 0 deletions docs/rest_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,52 @@ Possible Responses
| 500 Server Error | Internal Raiden node error|
+------------------+---------------------------+

Querying connections details
------------------------------

You can query for details of previously joined token networks by making a GET request to the connection endpoint.

``GET /api/<version>/connection``

The request will return a JSON object where each key is a token address for which you have open channels.
The values are a JSON object containing numeric values for ``funds`` from last connect request, ``sum_deposits``
of all currently open channels and number of ``channels`` currently open for that token.

Example Request
^^^^^^^^^^^^^^^

``GET /api/1/connection``

Example Response
^^^^^^^^^^^^^^^^
``200 OK``

::

{
"0x2a65aca4d5fc5b5c859090a6c34d164135398226": {
"funds": 100,
"sum_deposits": 67,
"channels": 3
},
"0x0f114a1e9db192502e7856309cc899952b3db1ed": {
"funds": 49
"sum_deposits": 31,
"channels": 1
}
}

Possible Responses
^^^^^^^^^^^^^^^^^^

+------------------+---------------------------+
| HTTP Code | Condition |
+==================+===========================+
| 200 OK | For a successful query |
+------------------+---------------------------+
| 500 Server Error | Internal Raiden node error|
+------------------+---------------------------+

Transfers
=========

Expand Down

0 comments on commit f2c4667

Please sign in to comment.