gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet-rest-api] 08/08: upadte namestore


From: gnunet
Subject: [GNUnet-SVN] [gnunet-rest-api] 08/08: upadte namestore
Date: Tue, 30 Apr 2019 16:44:58 +0200

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

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

commit 866784d8868938f89a02613a07681b2a3ed3e1bf
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Tue Apr 30 16:44:34 2019 +0200

    upadte namestore
---
 source/namestore.rst | 81 +++++++++++-----------------------------------------
 1 file changed, 16 insertions(+), 65 deletions(-)

diff --git a/source/namestore.rst b/source/namestore.rst
index 85aba3a..de3a045 100644
--- a/source/namestore.rst
+++ b/source/namestore.rst
@@ -13,10 +13,15 @@ Variables in single quotes ``'...'`` can or must be changed 
according to your sp
 GNS Record
 ----------
 
-Namestore entries are GNS records. GNS records have a ``record_type``, a 
``value``, an ``expiration_time``, a ``flag`` and a ``record_name``.
-Adding a GNS records with the same record_name overwrites the old GNS record.
+Namestore entries are GNS records. GNS records have a ``record_name`` and a set
+of record ``data''. The data consists of a ``value``, an ``expiration_time``,
+a ``flag`` and a ``record_name``.
+Adding a GNS records with the same record_name incrementally adds record to it.
 
-A GNS record is sent in the JSON format: ``{"value": "value", "record_type": 
"type", "expiration_time": "time", "flag": flag, "record_name": "rname"}``
+A GNS record is sent in the JSON format: ``{ "record_name:" "name", "data": 
[{"value": "value", "record_type": "type", "expiration_time": "time", "flag": 
flag},...}]}``
+
+
+``name`` is the name of the record.
 
 ``type`` is the type of the record, e.g. "PKEY" for private key. 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``
 
@@ -25,9 +30,6 @@ A GNS record is sent in the JSON format: ``{"value": "value", 
"record_type": "ty
 ``time`` is the expiration time of the record either "never" or fancy time 
(see GNUNET_STRINGS_fancy_time_to_absolute)
 
 ``flag`` is the option of the record. Either 0 for none, 2 for private, 8 for 
relative expiration or 16 if all other records have expired. ``flag`` must be a 
number.
-
-``rname`` is the name of the record.
-
 Error Response
 --------------
 
@@ -58,28 +60,10 @@ Requests
 GET Request
 ------------
 
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Title**           |Returns all namestore entries of default identity        
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**URL**             |:literal:`/namestore`                                    
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Method**          |**GET**                                                  
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**URL Params**      |none                                                     
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Data Params**     |none                                                     
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Success Response**|[{"value": "*value*", "record_type": "*type*", 
"expiration_time": "*time*", "flag": *flag*, "record_name": "*rname*"},...] |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Error Response**  | {"error":"*error_desc*"} :sup:`3; 4`                    
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-
-|
-
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
 |**Title**           |Returns all namestore entries for one zone specified by 
its name                                                           |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**URL**             |:literal:`/namestore/'name'`                             
                                                                  |
+|**URL**             |:literal:`/namestore/'zone'`                             
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
 |**Method**          |**GET**                                                  
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
@@ -87,7 +71,8 @@ GET Request
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
 |**Data Params**     |none                                                     
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Success Response**|[{"value": "*value*", "record_type": "*type*", 
"expiration_time": "*time*", "flag": *flag*, "record_name": "*rname*"},...] |
+|**Success Response**|[{"record_name": "*name*", "data:" [{"value": "*value*", 
"record_type": "*type*", "expiration_time": "*time*",             |
+|                    |"flag": *flag*},...]}]                                   
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
 |**Error Response**  | {"error":"*error_desc*"} :sup:`2; 4`                    
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
@@ -96,15 +81,16 @@ POST Request
 ------------
 
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Title**           |Creates a namestore entry for default identity           
                                                                  |
+|**Title**           |Creates a namestore entry in a zone                      
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**URL**             |:literal:`/namestore`                                    
                                                                  |
+|**URL**             |:literal:`/namestore/'zone'`                             
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
 |**Method**          |**POST**                                                 
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
 |**URL Params**      |none                                                     
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Data Params**     |{"value": "*value*", "record_type": "*type*", 
"expiration_time": "*time*", "flag": *flag*, "record_name": "*rname*"}       |
+|**Data Params**     |{"record_name": "*name*", "data": [{"value": "*value*", 
"record_type": "*type*", "expiration_time": "*time*",              |
+|                    |"flag": *flag*},...]}                                    
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
 |**Success Response**|Response Code: :literal:`204` (No Content)               
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
@@ -113,48 +99,13 @@ POST Request
 
 |
 
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Title**           |Creates a namestore entry for one zone specified by its 
name                                                               |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**URL**             |:literal:`/namestore/'name'`                             
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Method**          |**POST**                                                 
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**URL Params**      |none                                                     
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Data Params**     |{"value": "*value*", "record_type": "*type*", 
"expiration_time": "*time*", "flag": *flag*, "record_name": "*rname*"}       |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Success Response**|Response Code: :literal:`204` (No Content)               
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Error Response**  | {"error":"*error_desc*"} :sup:`2; 4; 5; 6; 7`           
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-
-
 DELETE Request
 --------------
 
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-| **Title**          | Deletes specific namestore entry for default identity   
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**URL**             |:literal:`/namestore?record_name='rname'`                
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Method**          | **DELETE**                                              
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**URL Params**      | none                                                    
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Data Params**     | none                                                    
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Success Response**| Response Code: :literal:`204` (No Content)              
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**Error Response**  | {"error":"*error_desc*"} :sup:`3; 4; 6; 8; 9`           
                                                                  |
-+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-
-|
-
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
 | **Title**          | Deletes specific namestore entry in specific zone       
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
-|**URL**             |:literal:`/namestore/'name'?record_name='rname'`         
                                                                  |
+|**URL**             |:literal:`/namestore/'zone'?record_name='name'`          
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+
 |**Method**          | **DELETE**                                              
                                                                  |
 
+--------------------+---------------------------------------------------------------------------------------------------------------------------+

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



reply via email to

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