gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet-rest-api] 04/07: Changed identity, gns and namestor


From: gnunet
Subject: [GNUnet-SVN] [gnunet-rest-api] 04/07: Changed identity, gns and namestore
Date: Sun, 12 Aug 2018 23:08:36 +0200

This is an automated email from the git hooks/post-receive script.

phil pushed a commit to branch master
in repository gnunet-rest-api.

commit 804493770fe509e3abff60e16e93429e06ad593c
Author: Phil <address@hidden>
AuthorDate: Mon Aug 6 02:51:27 2018 +0200

    Changed identity, gns and namestore
---
 source/conf.py       |  4 +--
 source/gns.rst       | 35 +++++++++++++-----------
 source/identity.rst  | 76 +++++++++++++++++++++++++++++++++++++++++++++++-----
 source/namestore.rst |  2 +-
 4 files changed, 92 insertions(+), 25 deletions(-)

diff --git a/source/conf.py b/source/conf.py
index e5ed1eb..45ea518 100644
--- a/source/conf.py
+++ b/source/conf.py
@@ -74,7 +74,7 @@ pygments_style = 'sphinx'
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
 #
-html_theme = 'alabaster'
+html_theme = 'nature'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
@@ -152,4 +152,4 @@ texinfo_documents = [
     (master_doc, 'GNUnetRESTAPI', 'GNUnet REST API Documentation',
      author, 'GNUnetRESTAPI', 'One line description of project.',
      'Miscellaneous'),
-]
\ No newline at end of file
+]
diff --git a/source/gns.rst b/source/gns.rst
index aa76b88..240a9d9 100644
--- a/source/gns.rst
+++ b/source/gns.rst
@@ -1,3 +1,5 @@
+.. _ref-type:
+
 GNUnet GNS API Service
 ======================
 
@@ -5,26 +7,27 @@ Variables in single quotes ``'...'`` can or must be changed 
according to your sp
 
 ``name`` is the name of an identity.
 
-``record_type`` is the record_type. For example, ANY, PKEY... For more 
information look into the source code of "gnunet_gnsrecord_lib.h".
+``record_type`` is the record_type. It can be ANY, PKEY, NICK, LEHO, VPN, 
GNS2DNS, BOX, PLACE, PHONE, ID_ATTR, ID_TOKEN, ID_TOKEN_METADATA, CREDENTIAL, 
POLICY, ATTRIBUTE, ABE_KEY, ABE_MASTER. You can find more information in header 
``src/gnunet_gnsrecord_lib.h``
 
 ============
 GET Requests
 ============
 
-+--------------------+------------------------------------------------------------------------------------------+
-|**Title**           |Return all records for given name                        
                                 |
-+--------------------+------------------------------------------------------------------------------------------+
-|**URL**             |:literal:`/gns?name='name'&record_type='record_type'`    
                                 |
-+--------------------+------------------------------------------------------------------------------------------+
-|**Method**          |**GET**                                                  
                                 |
-+--------------------+------------------------------------------------------------------------------------------+
-|**Data Params**     |none                                                     
                                 |
-+--------------------+------------------------------------------------------------------------------------------+
-|**Success Response**|[*TODO* gns record to string,...]                        
                                 |
-+--------------------+------------------------------------------------------------------------------------------+
-|**Error Response**  |{"error":"*error_desc*"}                                 
                                 |
-+--------------------+------------------------------------------------------------------------------------------+
-
+For this request ``record_type`` is optional. If called with an invalid 
record_type, it will automatically be set to ANY.
+
++--------------------+--------------------------------------------------------------------------------------------------------------+
+|**Title**           |Return all records for given name                        
                                                     |
++--------------------+--------------------------------------------------------------------------------------------------------------+
+|**URL**             |:literal:`/gns?name='name'&record_type='record_type'`    
                                                     |
++--------------------+--------------------------------------------------------------------------------------------------------------+
+|**Method**          |**GET**                                                  
                                                     |
++--------------------+--------------------------------------------------------------------------------------------------------------+
+|**Data Params**     |none                                                     
                                                     |
++--------------------+--------------------------------------------------------------------------------------------------------------+
+|**Success Response**| [{"value": "*value*", "type": "*type*", 
"expiration_time": "*time*", "flag": *flag*, "label": "*name*"},...] |
++--------------------+--------------------------------------------------------------------------------------------------------------+
+|**Error Response**  |{"error":"*error_desc*"}                                 
                                                     |
++--------------------+--------------------------------------------------------------------------------------------------------------+
 
 ===============
 OPTIONS Request
@@ -41,7 +44,7 @@ OPTIONS Request
 
+--------------------+---------------------------------------------------------+
 |**Data Params**     |none                                                     
|
 
+--------------------+---------------------------------------------------------+
-|**Success Response**|Access-Control-Allow-Methods: GET                        
|
+|**Success Response**|                                                         
|
 
+--------------------+---------------------------------------------------------+
 |**Error Response**  |none                                                     
|
 
+--------------------+---------------------------------------------------------+
diff --git a/source/identity.rst b/source/identity.rst
index ee2b1e7..79120c3 100644
--- a/source/identity.rst
+++ b/source/identity.rst
@@ -3,9 +3,9 @@ GNUnet Identity API Service
 
 Variables in single quotes ``'...'`` can or must be changed according to your 
specific case.
 
-``pubkey`` or ``public_key`` is the public key of an identity.
+``public_key`` is the public key of an identity.
 
-``name`` is the name of an identity.
+``name`` is the name of an identity. ``newname`` is the new name of an 
identity.
 
 ``subsystem`` is a subsystem of GNUnet.
 
@@ -98,7 +98,7 @@ POST Request
 +--------------------+----------------------------------------------------+
 |**URL Params**      |none                                                |
 +--------------------+----------------------------------------------------+
-|**Data Params**     |{"name":'*name*'}                                   |
+|**Data Params**     | {"name":'*name*'}                                  |
 +--------------------+----------------------------------------------------+
 |**Success Response**|Response Code: :literal:`201` (Created)             |
 +--------------------+----------------------------------------------------+
@@ -119,7 +119,7 @@ PUT Request
 +--------------------+----------------------------------------------------+
 |**URL Params**      |none                                                |
 +--------------------+----------------------------------------------------+
-|**Data Params**     | {"newname":'*name*', "pubkey": '*public_key*'}     |
+|**Data Params**     | {"newname":'*newname*', "pubkey": '*public_key*'}  |
 +--------------------+----------------------------------------------------+
 |**Success Response**|Response Code: :literal:`204` (No Content)          |
 +--------------------+----------------------------------------------------+
@@ -133,6 +133,50 @@ PUT Request
 |
 
 +--------------------+----------------------------------------------------+
+|**Title**           |Changes name of identity                            |
++--------------------+----------------------------------------------------+
+|**URL**             |:literal:`/identity`                                |
++--------------------+----------------------------------------------------+
+|**Method**          |**PUT**                                             |
++--------------------+----------------------------------------------------+
+|**URL Params**      |none                                                |
++--------------------+----------------------------------------------------+
+|**Data Params**     | {"newname":'*newname*', "name": '*name*'}          |
++--------------------+----------------------------------------------------+
+|**Success Response**|Response Code: :literal:`204` (No Content)          |
++--------------------+----------------------------------------------------+
+|**Error Response**  | | {"error":"*error_desc*"}                         |
+|                    | | *or*                                             |
+|                    | | Response Code: :literal:`404` (Not Found)        |
+|                    | | *or*                                             |
+|                    | | Response Code: :literal:`409` (Conflict)         |
++--------------------+----------------------------------------------------+
+
+|
+
++--------------------+------------------------------------------------------+
+|**Title**           |Sets identity as default for a subsystem              |
++--------------------+------------------------------------------------------+
+|**URL**             |:literal:`/identity`                                  |
++--------------------+------------------------------------------------------+
+|**Method**          |**PUT**                                               |
++--------------------+------------------------------------------------------+
+|**URL Params**      |none                                                  |
++--------------------+------------------------------------------------------+
+|**Data Params**     | {"subsystem":'*subsystem*', "pubkey": '*public_key*'}|
++--------------------+------------------------------------------------------+
+|**Success Response**|Response Code: :literal:`204` (No Content)            |
++--------------------+------------------------------------------------------+
+|**Error Response**  | | {"error":"*error_desc*"}                           |
+|                    | | *or*                                               |
+|                    | | Response Code: :literal:`404` (Not Found)          |
+|                    | | *or*                                               |
+|                    | | Response Code: :literal:`409` (Conflict)           |
++--------------------+------------------------------------------------------+
+
+|
+
++--------------------+----------------------------------------------------+
 |**Title**           |Sets identity as default for a subsystem            |
 +--------------------+----------------------------------------------------+
 |**URL**             |:literal:`/identity`                                |
@@ -141,7 +185,7 @@ PUT Request
 +--------------------+----------------------------------------------------+
 |**URL Params**      |none                                                |
 +--------------------+----------------------------------------------------+
-|**Data Params**     | {"subsystem":'*name*', "pubkey": '*public_key*'}   |
+|**Data Params**     | {"subsystem":'*subsystem*', "name": '*name*'}      |
 +--------------------+----------------------------------------------------+
 |**Success Response**|Response Code: :literal:`204` (No Content)          |
 +--------------------+----------------------------------------------------+
@@ -174,6 +218,26 @@ DELETE Request
 |                    | | Response Code: :literal:`404` (Not Found)        |
 +--------------------+----------------------------------------------------+
 
+|
+
++--------------------+----------------------------------------------------+
+|**Title**           |Deletes specific identity                           |
++--------------------+----------------------------------------------------+
+|**URL**             |:literal:`/identity?name='name'`                    |
++--------------------+----------------------------------------------------+
+|**Method**          |**DELETE**                                          |
++--------------------+----------------------------------------------------+
+|**URL Params**      |none                                                |
++--------------------+----------------------------------------------------+
+|**Data Params**     |none                                                |
++--------------------+----------------------------------------------------+
+|**Success Response**|Response Code: :literal:`204` (No Content)          |
++--------------------+----------------------------------------------------+
+|**Error Response**  | | {"error":"*error_desc*"}                         |
+|                    | | *or*                                             |
+|                    | | Response Code: :literal:`404` (Not Found)        |
++--------------------+----------------------------------------------------+
+
 
 OPTIONS Request
 ---------------
@@ -189,7 +253,7 @@ OPTIONS Request
 
+--------------------+---------------------------------------------------------+
 |**Data Params**     |none                                                     
|
 
+--------------------+---------------------------------------------------------+
-|**Success Response**|Access-Control-Allow-Methods: 
GET,POST,PUT,DELETE,OPTIONS|
+|**Success Response**|                                                         
|
 
+--------------------+---------------------------------------------------------+
 |**Error Response**  |none                                                     
|
 
+--------------------+---------------------------------------------------------+
diff --git a/source/namestore.rst b/source/namestore.rst
index 6adb4a2..35eb104 100644
--- a/source/namestore.rst
+++ b/source/namestore.rst
@@ -5,7 +5,7 @@ Variables in single quotes ``'...'`` can or must be changed 
according to your sp
 
 Namestore communicates with GNS records.
 
-``type`` is the type of the record, e.g. "PKEY" for private key.
+``type`` is the type of the record, e.g. "PKEY" for private key. Possible 
types are listed in :ref:`ref-type`.
 
 ``value`` is the value of the specific type of the record, e.g. the private 
key of an identity.
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]