[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet-rest-api] 03/07: add namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet-rest-api] 03/07: add namestore |
Date: |
Sun, 12 Aug 2018 23:08:35 +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 802b073508b373d6d1dd03c134d301b44cc49b64
Author: Phil <address@hidden>
AuthorDate: Mon Jul 30 00:40:48 2018 +0200
add namestore
---
source/index.rst | 1 +
source/namestore.rst | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 78 insertions(+), 2 deletions(-)
diff --git a/source/index.rst b/source/index.rst
index b31dec1..3f41bb9 100644
--- a/source/index.rst
+++ b/source/index.rst
@@ -31,6 +31,7 @@ The GNUnet Web API is based in REST principles. Data
resources are accessed via
identity
gns
+ namestore
diff --git a/source/namestore.rst b/source/namestore.rst
index 39d21d3..6adb4a2 100644
--- a/source/namestore.rst
+++ b/source/namestore.rst
@@ -1,6 +1,81 @@
GNUnet Namestore API Service
-===========================
+============================
Variables in single quotes ``'...'`` can or must be changed according to your
specific case.
-namestore add: identity_name, record_name, record_type, expiration_time,
value, flag(?)
+Namestore communicates with GNS records.
+
+``type`` is the type of the record, e.g. "PKEY" for private key.
+
+``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)
+
+``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
+
+``label`` is the name of the record. No duplicates are allowed.
+
+``error_desc`` is the description of the returned error.
+
+
+GET Request
+------------
+
++--------------------+---------------------------------------------------------------------------------------------------------------------------+
+|**Title** |Returns all namestore entries
|
++--------------------+---------------------------------------------------------------------------------------------------------------------------+
+|**URL** |:literal:`/namestore`
|
++--------------------+---------------------------------------------------------------------------------------------------------------------------+
+|**Method** |**GET**
|
++--------------------+---------------------------------------------------------------------------------------------------------------------------+
+|**URL Params** |none
|
++--------------------+---------------------------------------------------------------------------------------------------------------------------+
+|**Data Params** |none
|
++--------------------+---------------------------------------------------------------------------------------------------------------------------+
+|**Success Response**|[{"value": "*value*", "type": "*type*",
"expiration_time": "*time*", "flag": *flag*, "label": "*name*"},...]
|
++--------------------+---------------------------------------------------------------------------------------------------------------------------+
+|**Error Response** |{"error":"*error_desc*"}
|
++--------------------+---------------------------------------------------------------------------------------------------------------------------+
+
+
+POST Request
+------------
+
++--------------------+------------------------------------------------------------------------------------------------------+
+|**Title** |Creates a namestore entry
|
++--------------------+------------------------------------------------------------------------------------------------------+
+|**URL** |:literal:`/namestore`
|
++--------------------+------------------------------------------------------------------------------------------------------+
+|**Method** |**POST**
|
++--------------------+------------------------------------------------------------------------------------------------------+
+|**URL Params** |none
|
++--------------------+------------------------------------------------------------------------------------------------------+
+|**Data Params** |{"value": "*value*", "type": "*type*",
"expiration_time": "*time*", "flag": *flag*, "label": "*name*"}|
++--------------------+------------------------------------------------------------------------------------------------------+
+|**Success Response**|Response Code: :literal:`204` (No Content)
|
++--------------------+------------------------------------------------------------------------------------------------------+
+|**Error Response** | | {"error":"*error_desc*"}
|
+| | | *or*
|
+| | | Response Code: :literal:`409` (Conflict)
|
++--------------------+------------------------------------------------------------------------------------------------------+
+
+
+DELETE Request
+--------------
+
++--------------------+----------------------------------------------------+
+| **Title** | Deletes specific namestore entry |
++--------------------+----------------------------------------------------+
+|**URL** |:literal:`/namestore?label='label'` |
++--------------------+----------------------------------------------------+
+|**Method** | **DELETE** |
++--------------------+----------------------------------------------------+
+|**URL Params** | none |
++--------------------+----------------------------------------------------+
+|**Data Params** | none |
++--------------------+----------------------------------------------------+
+|**Success Response**| Response Code: :literal:`204` (No Content) |
++--------------------+----------------------------------------------------+
+|**Error Response** | {"error":"*error_desc*"} |
++--------------------+----------------------------------------------------+
+
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet-rest-api] branch master updated (5e5750f -> c4883a8), gnunet, 2018/08/12
- [GNUnet-SVN] [gnunet-rest-api] 01/07: added identity get, gnunet, 2018/08/12
- [GNUnet-SVN] [gnunet-rest-api] 02/07: -wip documentation, gnunet, 2018/08/12
- [GNUnet-SVN] [gnunet-rest-api] 06/07: Added additional information for identity API, gnunet, 2018/08/12
- [GNUnet-SVN] [gnunet-rest-api] 03/07: add namestore,
gnunet <=
- [GNUnet-SVN] [gnunet-rest-api] 04/07: Changed identity, gns and namestore, gnunet, 2018/08/12
- [GNUnet-SVN] [gnunet-rest-api] 05/07: Changed identity, wip namestore, gnunet, 2018/08/12
- [GNUnet-SVN] [gnunet-rest-api] 07/07: fix apis, gnunet, 2018/08/12