gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-rest-api] branch master updated (eb47741 -> 47f2db1)


From: gnunet
Subject: [gnunet-rest-api] branch master updated (eb47741 -> 47f2db1)
Date: Sat, 09 May 2020 20:17:22 +0200

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

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

    from eb47741  update version
     new cf063ec  proposal for extending the API
     new d8ecd15  included extension for relative expiration time
     new ba26b9b  added missing url parameters
     new d7e8b23  added filtering of record type to neutral GET
     new 47f2db1  update api

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 source/identity.rst  |  6 ++---
 source/namestore.rst | 66 +++++++++++++++++++++++++++++++++++++++++++++-------
 2 files changed, 60 insertions(+), 12 deletions(-)

diff --git a/source/identity.rst b/source/identity.rst
index 8474e71..6dc55cf 100644
--- a/source/identity.rst
+++ b/source/identity.rst
@@ -8,7 +8,7 @@ Variables in single quotes ``'...'`` can or must be changed 
according to your sp
 
 ``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 for the rename request.
 
@@ -32,7 +32,7 @@ An error response is sent in the JSON format: 
``{"error":"*error_description*"}`
 Following numbers are added for references inside the documentation only.
 
 Error descriptions are::
-    
+
     Nr. Error Description           - Explanation
     1)  Unknown Error               - Error is not specified
     2)  No identity found           - Identity was not found with given name, 
public key or no identity was found at all
@@ -58,7 +58,7 @@ A response of a message has a HTTP response code. Usually, 
this code is 200 OK f
     c) 204 No Content - Success PUT or DELETE request
     d) 404 Not Found  - Identity is not found with identifier
     e) 409 Conflict   - PUT or POST request not possible due to existing 
duplicate
-    
+
 ``d) 404 Not Found`` is always used when the error message is either ``2)``, 
``3)`` or ``4)``.
 
 Requests
diff --git a/source/namestore.rst b/source/namestore.rst
index 8ead7c6..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
   }
 
 
@@ -41,9 +44,15 @@ A ``RecordData`` has the following format ::
 
 ``value`` is the value of the specific type of the record, e.g. the private 
key of an identity.
 
-``time`` is the expiration time of the record either "never" or fancy time 
(see GNUNET_STRINGS_fancy_time_to_absolute)
+``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
 --------------
@@ -53,11 +62,11 @@ An error response is sent in the JSON format: 
``{"error":"*error_description*"}`
 Following numbers are added for references inside the documentation only.
 
 Error descriptions are::
-    
+
     Nr. Error Description           - Explanation
     1)  Unknown Error               - Error is not specified
     2)  No identity found           - Identity was not found with given name, 
this is combined with the HTTP Error Code 404 Not Found
-    3)  No default zone specified   - Identity name was not given and no 
identiy was added to the subsystem namestore 
+    3)  No default zone specified   - Identity name was not given and no 
identiy was added to the subsystem namestore
     4)  Namestore action failed     - The task of the namestore API (not REST 
API) failed
     5)  No data                     - Missing data
     6)  Data invalid                - Wrong data given
@@ -82,7 +91,7 @@ GET Request
 
+--------------------+---------------------------------------------------------+
 |**Method**          |**GET**                                                  
|
 
+--------------------+---------------------------------------------------------+
-|**URL Params**      |none                                                     
|
+|**URL Params**      |``?record_type='type'`` optional                         
|
 
+--------------------+---------------------------------------------------------+
 |**Data Params**     |none                                                     
|
 
+--------------------+---------------------------------------------------------+
@@ -91,11 +100,29 @@ GET Request
 |**Error Response**  | {"error":"*error_desc*"} :sup:`2; 4`                    
|
 
+--------------------+---------------------------------------------------------+
 
++--------------------+------------------------------------------------------------------------+
+|**Title**           |Returns namestore entry for zone and name optionally 
filtering by type. |
++--------------------+------------------------------------------------------------------------+
+|**URL**             |:literal:`/namestore/'zone'/'name'`                      
               |
++--------------------+------------------------------------------------------------------------+
+|**Method**          |**GET**                                                  
               |
++--------------------+------------------------------------------------------------------------+
+|**URL Params**      |``record_type='type'`` optional                          
              |
++--------------------+------------------------------------------------------------------------+
+|**Data Params**     |none                                                     
               |
++--------------------+------------------------------------------------------------------------+
+|**Success Response**|``Record``                                               
               |
++--------------------+------------------------------------------------------------------------+
+|**Error Response**  | {"error":"*error_desc*"} :sup:`2; 4`                    
               |
++--------------------+------------------------------------------------------------------------+
+
+|
+
 POST Request
 ------------
 
 
+--------------------+---------------------------------------------------------+
-|**Title**           |Creates a namestore entry in a zone                      
|
+|**Title**           |Creates a namestore entry in a zone.                     
|
 
+--------------------+---------------------------------------------------------+
 |**URL**             |:literal:`/namestore/'zone'`                             
|
 
+--------------------+---------------------------------------------------------+
@@ -112,13 +139,34 @@ POST Request
 
 |
 
+PUT Request
+------------
+
++--------------------+---------------------------------------------------------+
+|**Title**           |Replaces a namestore entriy in a zone                    
|
++--------------------+---------------------------------------------------------+
+|**URL**             |:literal:`/namestore/'zone'`                             
|
++--------------------+---------------------------------------------------------+
+|**Method**          |**PUT**                                                  
|
++--------------------+---------------------------------------------------------+
+|**URL Params**      |none                                                     
|
++--------------------+---------------------------------------------------------+
+|**Data Params**     |``Record``                                               
|
++--------------------+---------------------------------------------------------+
+|**Success Response**|Response Code: :literal:`204` (No Content)               
|
++--------------------+---------------------------------------------------------+
+|**Error Response**  | {"error":"*error_desc*"} :sup:`3; 4; 5; 6; 7`           
|
++--------------------+---------------------------------------------------------+
+
+|
+
 DELETE Request
 --------------
 
 +--------------------+---------------------------------------------------+
 | **Title**          | Deletes specific namestore entry in specific zone |
 +--------------------+---------------------------------------------------+
-|**URL**             |:literal:`/namestore/'zone'?record_name='name'`    |
+|**URL**             |:literal:`/namestore/'zone'/'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]