gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet-rest-api] branch master updated: Added identity and


From: gnunet
Subject: [GNUnet-SVN] [gnunet-rest-api] branch master updated: Added identity and gns
Date: Sun, 24 Jun 2018 21:10:21 +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.

The following commit(s) were added to refs/heads/master by this push:
     new 5e5750f  Added identity and gns
5e5750f is described below

commit 5e5750f669a42cfd392bafc00238a6d879ab4556
Author: Phil <address@hidden>
AuthorDate: Sun Jun 24 21:09:56 2018 +0200

    Added identity and gns
---
 source/gns.rst      |  14 +++----
 source/identity.rst | 113 +++++++++++++++++++++++++++++++++++++---------------
 source/intro.rst    | 110 --------------------------------------------------
 3 files changed, 87 insertions(+), 150 deletions(-)

diff --git a/source/gns.rst b/source/gns.rst
index 1a77379..70ac34c 100644
--- a/source/gns.rst
+++ b/source/gns.rst
@@ -1,6 +1,11 @@
 GNUnet GNS API Service
 ======================
 
+Variables in single quotes ``'...'`` can and must be changed according to your 
specific case.
+
+``name`` is the name of an identity.
+
+``record_type`` is the record_type integer, the system returns. For example, 
``0`` = ANY, ``65536`` = PKEY. For more information look into the source code 
of "gnunet_gnsrecord_lib.h".
 
 ============
 GET Requests
@@ -9,18 +14,13 @@ GET Requests
 
+--------------------+------------------------------------------------------------------------------------------+
 |**Title**           |Return all records for given name                        
                                 |
 
+--------------------+------------------------------------------------------------------------------------------+
-|**URL**             |:literal:`/gns`                                          
                                 |
+|**URL**             |:literal:`/gns?name='name'&record_type='record_type'`    
                                 |
 
+--------------------+------------------------------------------------------------------------------------------+
 |**Method**          |**GET**                                                  
                                 |
 
+--------------------+------------------------------------------------------------------------------------------+
-|**URL Params**      | | ``?name=``:name                                       
                                 |
-|                    | | optional: ``&record_type=``:type                      
                                 |
-|                    | | optional: ``&options=``:(0|1|2)                       
                                 |
-|                    | | optional: ``&pkey=``:zonekey *or* 
``&ego=``:identity_name                              |
-+--------------------+------------------------------------------------------------------------------------------+
 |**Data Params**     |none                                                     
                                 |
 
+--------------------+------------------------------------------------------------------------------------------+
-|**Success Response**|[{"id":"*id*", "type":"*ego*", "name":"*name*"},...]     
                                 |
+|**Success Response**|[*TODO* gns record to string,...]                        
                                 |
 
+--------------------+------------------------------------------------------------------------------------------+
 |**Error Response**  |{"error":"*error_desc*"}                                 
                                 |
 
+--------------------+------------------------------------------------------------------------------------------+
diff --git a/source/identity.rst b/source/identity.rst
index 48e5e5a..501745a 100644
--- a/source/identity.rst
+++ b/source/identity.rst
@@ -1,15 +1,40 @@
 GNUnet Identity API Service
 ===========================
 
+Variables in single quotes ``'...'`` can and must be changed according to your 
specific case.
+
+``pubkey`` or ``public_key`` is the public key of an identity.
+
+``name`` is the name of an identity.
+
+``subsystem`` is a subsystem of GNUnet.
+
 
-============
 GET Requests
-============
+------------
+
++--------------------+---------------------------------------------------------------+
+|**Title**           |Returns all identities with name and public key          
      |
++--------------------+---------------------------------------------------------------+
+|**URL**             |:literal:`/identity`                                     
      |
++--------------------+---------------------------------------------------------------+
+|**Method**          |**GET**                                                  
      |
++--------------------+---------------------------------------------------------------+
+|**URL Params**      |none                                                     
      |
++--------------------+---------------------------------------------------------------+
+|**Data Params**     |none                                                     
      |
++--------------------+---------------------------------------------------------------+
+|**Success Response**|[{"pubkey":"*public_key*", "name":"*name*"},...]         
      |
++--------------------+---------------------------------------------------------------+
+|**Error Response**  |{"error":"*error_desc*"}                                 
      |
++--------------------+---------------------------------------------------------------+
+
+|
 
 +--------------------+----------------------------------------------------+
-|**Title**           |Return all identities                               |
+|**Title**           |Returns only a specific identity                    |
 +--------------------+----------------------------------------------------+
-|**URL**             |:literal:`/identity`                                |
+|**URL**             |:literal:`/identity?pubkey='public_key'`            |
 +--------------------+----------------------------------------------------+
 |**Method**          |**GET**                                             |
 +--------------------+----------------------------------------------------+
@@ -17,66 +42,88 @@ GET Requests
 +--------------------+----------------------------------------------------+
 |**Data Params**     |none                                                |
 +--------------------+----------------------------------------------------+
-|**Success Response**|[{"id":"*id*", "type":"*ego*", "name":"*name*"},...]|
+|**Success Response**|[{"pubkey":"*public_key*", "name":"*name*"}]        |
 +--------------------+----------------------------------------------------+
 |**Error Response**  |{"error":"*error_desc*"}                            |
 +--------------------+----------------------------------------------------+
 
 |
+
++--------------------+---------------------------------------------------------------+
+|**Title**           |Returns default identity for specific subsystem          
      |
++--------------------+---------------------------------------------------------------+
+|**URL**             |:literal:`/identity?subsystem='subsystem'`               
      |
++--------------------+---------------------------------------------------------------+
+|**Method**          |**GET**                                                  
      |
++--------------------+---------------------------------------------------------------+
+|**URL Params**      |none                                                     
      |
++--------------------+---------------------------------------------------------------+
+|**Data Params**     |none                                                     
      |
++--------------------+---------------------------------------------------------------+
+|**Success Response**|{"pubkey":"*public_key*", "name":"*name*"}               
      |
++--------------------+---------------------------------------------------------------+
+|**Error Response**  |{"error":"*error_desc*"}                                 
      |
++--------------------+---------------------------------------------------------------+
+|**Attention**       |The response in this request is NOT an array!            
      |
++--------------------+---------------------------------------------------------------+
+
+
+POST Request
+------------
+
 +--------------------+----------------------------------------------------+
-|**Title**           |Return specific identity                            |
+|**Title**           |Creates an identity                                 |
 +--------------------+----------------------------------------------------+
-|**URL**             |:literal:`/identity:id`                             |
+|**URL**             |:literal:`/identity`                                |
 +--------------------+----------------------------------------------------+
-|**Method**          |**GET**                                             |
+|**Method**          |**POST**                                            |
 +--------------------+----------------------------------------------------+
 |**URL Params**      |none                                                |
 +--------------------+----------------------------------------------------+
-|**Data Params**     |none                                                |
+|**Data Params**     |{"name":'*name*'}                                   |
 +--------------------+----------------------------------------------------+
-|**Success Response**|[{"id":"*id*", "type":"*ego*", "name":"*name*"}]    |
+|**Success Response**|Response Code: :literal:`201` (Created)             |
 +--------------------+----------------------------------------------------+
-|**Error Response**  |{"error":"*error_desc*"}                            |
+|**Error Response**  | | {"error":"*error_desc*"}                         |
+|                    | | *or*                                             |
+|                    | | Response Code: :literal:`409` (Conflict)         |
 +--------------------+----------------------------------------------------+
 
-============
-POST Request
-============
+PUT Request
+-----------
 
 +--------------------+----------------------------------------------------+
-|**Title**           |Create identity                                     |
+|**Title**           |Changes name of identity                            |
 +--------------------+----------------------------------------------------+
 |**URL**             |:literal:`/identity`                                |
 +--------------------+----------------------------------------------------+
-|**Method**          |**POST**                                            |
+|**Method**          |**PUT**                                             |
 +--------------------+----------------------------------------------------+
 |**URL Params**      |none                                                |
 +--------------------+----------------------------------------------------+
-|**Data Params**     |{"name":"*name*"}                                   |
+|**Data Params**     | {"newname":'*name*', "pubkey": '*public_key*'}     |
 +--------------------+----------------------------------------------------+
-|**Success Response**|Response Code: :literal:`201` (Created)             |
+|**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)         |
 +--------------------+----------------------------------------------------+
 
-===========
-PUT Request
-===========
+|
 
 +--------------------+----------------------------------------------------+
-|**Title**           |Change name or subsystem of identity                |
+|**Title**           |Sets identity as default for a subsystem            |
 +--------------------+----------------------------------------------------+
-|**URL**             |:literal:`/identity/:id`                            |
+|**URL**             |:literal:`/identity`                                |
 +--------------------+----------------------------------------------------+
 |**Method**          |**PUT**                                             |
 +--------------------+----------------------------------------------------+
 |**URL Params**      |none                                                |
 +--------------------+----------------------------------------------------+
-|**Data Params**     | | {"newname":"*name*"} : Rename                    |
-|                    | | *or*                                             |
-|                    | | {"subsystem":"*name*"} : Set subsystem           |
+|**Data Params**     | {"subsystem":'*name*', "pubkey": '*public_key*'}   |
 +--------------------+----------------------------------------------------+
 |**Success Response**|Response Code: :literal:`204` (No Content)          |
 +--------------------+----------------------------------------------------+
@@ -87,14 +134,14 @@ PUT Request
 |                    | | Response Code: :literal:`409` (Conflict)         |
 +--------------------+----------------------------------------------------+
 
-==============
+
 DELETE Request
-==============
+--------------
 
 +--------------------+----------------------------------------------------+
-|**Title**           |Delete specific identity                            |
+|**Title**           |Deletes specific identity                           |
 +--------------------+----------------------------------------------------+
-|**URL**             |:literal:`/identity:id`                             |
+|**URL**             |:literal:`/identity?pubkey='public_key'`            |
 +--------------------+----------------------------------------------------+
 |**Method**          |**DELETE**                                          |
 +--------------------+----------------------------------------------------+
@@ -109,12 +156,12 @@ DELETE Request
 |                    | | Response Code: :literal:`404` (Not Found)        |
 +--------------------+----------------------------------------------------+
 
-===============
+
 OPTIONS Request
-===============
+---------------
 
 
+--------------------+---------------------------------------------------------+
-|**Title**           |Get request options                                      
|
+|**Title**           |Gets request options                                     
|
 
+--------------------+---------------------------------------------------------+
 |**URL**             |:literal:`/identity`                                     
|
 
+--------------------+---------------------------------------------------------+
diff --git a/source/intro.rst b/source/intro.rst
deleted file mode 100644
index ffa2a6a..0000000
--- a/source/intro.rst
+++ /dev/null
@@ -1,110 +0,0 @@
-GNUnet Identity API Service
-===========================
-
-
-============
-GET Requests
-============
-
-+--------------------+----------------------------------------------------+
-|**Title**           |Return all identities                               |
-+--------------------+----------------------------------------------------+
-|**URL**             |:literal:`/identity`                                |
-+--------------------+----------------------------------------------------+
-|**Method**          |**GET**                                             |
-+--------------------+----------------------------------------------------+
-|**URL Params**      |none                                                |
-+--------------------+----------------------------------------------------+
-|**Data Params**     |none                                                |
-+--------------------+----------------------------------------------------+
-|**Success Response**|[{"id":"*id*", "type":"*ego*", "name":"*name*"},...]|
-+--------------------+----------------------------------------------------+
-|**Error Response**  |{"error":"*error_desc*"}                            |
-+--------------------+----------------------------------------------------+
-
-|
-+--------------------+----------------------------------------------------+
-|**Title**           |Return specific identity                            |
-+--------------------+----------------------------------------------------+
-|**URL**             |:literal:`/identity:id`                             |
-+--------------------+----------------------------------------------------+
-|**Method**          |**GET**                                             |
-+--------------------+----------------------------------------------------+
-|**URL Params**      |none                                                |
-+--------------------+----------------------------------------------------+
-|**Data Params**     |none                                                |
-+--------------------+----------------------------------------------------+
-|**Success Response**|[{"id":"*id*", "type":"*ego*", "name":"*name*"}]    |
-+--------------------+----------------------------------------------------+
-|**Error Response**  |{"error":"*error_desc*"}                            |
-+--------------------+----------------------------------------------------+
-
-============
-POST Request
-============
-
-+--------------------+----------------------------------------------------+
-|**Title**           |Create identity                                     |
-+--------------------+----------------------------------------------------+
-|**URL**             |:literal:`/identity`                                |
-+--------------------+----------------------------------------------------+
-|**Method**          |**POST**                                            |
-+--------------------+----------------------------------------------------+
-|**URL Params**      |none                                                |
-+--------------------+----------------------------------------------------+
-|**Data Params**     |{"name":"*name*"}                                   |
-+--------------------+----------------------------------------------------+
-|**Success Response**|Response Code: :literal:`201` (Created)             |
-+--------------------+----------------------------------------------------+
-|**Error Response**  | | {"error":"*error_desc*"}                         |
-|                    | | *or*                                             |
-|                    | | Response Code: :literal:`409` (Conflict)         |
-+--------------------+----------------------------------------------------+
-
-===========
-PUT Request
-===========
-
-+--------------------+----------------------------------------------------+
-|**Title**           |Change name or subsystem of identity                |
-+--------------------+----------------------------------------------------+
-|**URL**             |:literal:`/identity/:id`                            |
-+--------------------+----------------------------------------------------+
-|**Method**          |**PUT**                                             |
-+--------------------+----------------------------------------------------+
-|**URL Params**      |none                                                |
-+--------------------+----------------------------------------------------+
-|**Data Params**     | | {"newname":"*name*"} : Rename                    |
-|                    | | *or*                                             |
-|                    | | {"subsystem":"*name*"} : Set subsystem           |
-+--------------------+----------------------------------------------------+
-|**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)         |
-+--------------------+----------------------------------------------------+
-
-==============
-DELETE Request
-==============
-
-+--------------------+----------------------------------------------------+
-|**Title**           |Delete specific identity                            |
-+--------------------+----------------------------------------------------+
-|**URL**             |:literal:`/identity:id`                             |
-+--------------------+----------------------------------------------------+
-|**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)        |
-+--------------------+----------------------------------------------------+

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



reply via email to

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