gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-rest-api] 05/05: update api


From: gnunet
Subject: [gnunet-rest-api] 05/05: update api
Date: Sat, 09 May 2020 20:17:27 +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 47f2db1f7a802c819aa100e33405e948c12a034b
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Sat May 9 20:12:23 2020 +0200

    update api
---
 source/namestore.rst | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/source/namestore.rst b/source/namestore.rst
index eecf41e..8be3ebb 100644
--- a/source/namestore.rst
+++ b/source/namestore.rst
@@ -15,7 +15,7 @@ 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``.
+flags 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 ::
@@ -31,7 +31,10 @@ A ``RecordData`` has the following format ::
     "value": string,
     "record_type": string,
     "expiration_time": string,
-    "flag": string
+    "private": boolean,
+    "relative_expiration": boolean,
+    "supplemental": boolean,
+    "shadow": boolean
   }
 
 
@@ -43,7 +46,13 @@ A ``RecordData`` has the following format ::
 
 ``time`` is the expiration time of the record either "never", fancy time (see 
GNUNET_STRINGS_fancy_time_to_absolute) or a realtive expiration time.
 
-``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.
+``private`` is a flag of the record. True if private.
+
+``relative_expiration`` is a flag of the record. True if expiration is in 
relative fancy time.
+
+``supplemental`` is a flag of the record. True if record is supplemental.
+
+``shadow`` is a flag of the record. True if this is a shadow record.
 
 Error Response
 --------------
@@ -78,7 +87,7 @@ GET Request
 
+--------------------+---------------------------------------------------------+
 |**Title**           |Returns all namestore entries for one zone.              
|
 
+--------------------+---------------------------------------------------------+
-|**URL**             |:literal:`/namestore/'zone'?record_type='type'`          
|
+|**URL**             |:literal:`/namestore/'zone'`                             
|
 
+--------------------+---------------------------------------------------------+
 |**Method**          |**GET**                                                  
|
 
+--------------------+---------------------------------------------------------+
@@ -94,11 +103,11 @@ GET Request
 
+--------------------+------------------------------------------------------------------------+
 |**Title**           |Returns namestore entry for zone and name optionally 
filtering by type. |
 
+--------------------+------------------------------------------------------------------------+
-|**URL**             |:literal:`/namestore/'zone'/'name'?record_type='type'`   
               |
+|**URL**             |:literal:`/namestore/'zone'/'name'`                      
               |
 
+--------------------+------------------------------------------------------------------------+
 |**Method**          |**GET**                                                  
               |
 
+--------------------+------------------------------------------------------------------------+
-|**URL Params**      |``?record_type='type'`` optional                         
               |
+|**URL Params**      |``record_type='type'`` optional                          
              |
 
+--------------------+------------------------------------------------------------------------+
 |**Data Params**     |none                                                     
               |
 
+--------------------+------------------------------------------------------------------------+
@@ -107,6 +116,8 @@ GET Request
 |**Error Response**  | {"error":"*error_desc*"} :sup:`2; 4`                    
               |
 
+--------------------+------------------------------------------------------------------------+
 
+|
+
 POST Request
 ------------
 
@@ -155,11 +166,11 @@ DELETE Request
 +--------------------+---------------------------------------------------+
 | **Title**          | Deletes specific namestore entry in specific zone |
 +--------------------+---------------------------------------------------+
-|**URL**             |:literal:`/namestore/'zone'?record_name='name'`    |
+|**URL**             |:literal:`/namestore/'zone'/'name'`                |
 +--------------------+---------------------------------------------------+
 |**Method**          | **DELETE**                                        |
 +--------------------+---------------------------------------------------+
-|**URL Params**      | ``?record_name='name'`` required                  |
+|**URL Params**      | none                                              |
 +--------------------+---------------------------------------------------+
 |**Data Params**     | none                                              |
 +--------------------+---------------------------------------------------+

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



reply via email to

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