gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-rest-api] branch master updated: update API


From: gnunet
Subject: [gnunet-rest-api] branch master updated: update API
Date: Fri, 14 Feb 2020 10:53:27 +0100

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.

The following commit(s) were added to refs/heads/master by this push:
     new e7c3b59  update API
e7c3b59 is described below

commit e7c3b591ba82c7540efca993fa29300564dafbfa
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Fri Feb 14 10:49:35 2020 +0100

    update API
---
 source/reclaim.rst | 130 +++++++++++++++++++++--------------------------------
 1 file changed, 51 insertions(+), 79 deletions(-)

diff --git a/source/reclaim.rst b/source/reclaim.rst
index fb5b825..eba5312 100644
--- a/source/reclaim.rst
+++ b/source/reclaim.rst
@@ -8,21 +8,49 @@ Variables in single quotes ``'...'`` can or must be changed 
according to your sp
 
 ``ego`` is the name of an identity.
 
-``name`` is the attribute name.
+``name`` is the attribute or attestation name.
 
-``value`` is the attribute value.
+``value`` is the attribute or attestation value.
 
-``type`` is the attribute type.
+``type`` is the attribute or attestation type.
 
-``id`` is the attribute ID. This ID is the name under which the attribute can
+``id`` is the attribute or attestation ID. This ID is the name under which the 
attribute can
 be found in the namestore.
 
 ``flag`` is the attribute flag. It provides insights, whether the attribute is 
 third-party attested.
 
-``ref_value`` is the claim inside the referenced attestation.
+An ``Attribute`` JSON object is defined as follows ::
+
+  {
+    "id": string,
+    "name": string,
+    "type": string,
+    "value": string,
+    "attestation": string,
+    "flag": string
+  }
+
+An ``Attestation`` JSON object is defined as follows ::
+
+  {
+    "id": string,
+    "name": string,
+    "type": string,
+    "value": string,
+    "attestation": string,
+    "flag": string,
+    "attributes": Attribute[]
+  }
+
+A ``Ticket`` JSON object is defined as follows ::
+
+  {
+    "issuer": string,
+    "adience": string,
+    "rnd": string,
+  }
 
-``ref_id`` is the ID of the referenced attestation.
 
 
 Error Response
@@ -68,6 +96,14 @@ Requests
 Attribute Management
 --------------------
 
+In order to add a self-asserted attribute make sure "attestation" is empty
+and specity the attribute value in the "value" parameter.
+
+In order to add an attribute which is attested by an attestation, add the id
+of the attestation to the "attestation" field and specify the attribute in the
+attestation as attribute "value".
+The attestation must exist.
+
 
+--------------------+---------------------------------------------------------------+
 |**Title**           |Returns all attributes for an identity                   
      |
 
+--------------------+---------------------------------------------------------------+
@@ -79,14 +115,14 @@ Attribute Management
 
+--------------------+---------------------------------------------------------------+
 |**Data Params**     |none                                                     
      |
 
+--------------------+---------------------------------------------------------------+
-|**Success Response**|[{"value":"*value*", "name":"*name*",                    
      |
-|                    |  "type": "*type*", "id": "*id*", "flag": "*flag*"},...] 
      |
+|**Success Response**|``Attribute[]``                                          
      |
 
+--------------------+---------------------------------------------------------------+
 |**Error Response**  | {"error":"*error_desc*"} :sup:`2`                       
      |
 
+--------------------+---------------------------------------------------------------+
 |**Attention**       | The response in this request is an array.               
      |
 
+--------------------+---------------------------------------------------------------+
 
+
 |
 
 
+--------------------+----------------------------------------------------------------+
@@ -98,8 +134,7 @@ Attribute Management
 
+--------------------+----------------------------------------------------------------+
 |**URL Params**      |none                                                     
       |
 
+--------------------+----------------------------------------------------------------+
-|**Data Params**     |{"value":"*value*", "name":"*name*",                     
       |
-|                    | "type": "*type*", "id": "*id*"}                         
       |
+|**Data Params**     |``Attribute``                                            
       |
 
+--------------------+----------------------------------------------------------------+
 |**Success Response**|Response Code: :literal:` b) 200 OK`                     
       |
 
+--------------------+----------------------------------------------------------------+
@@ -138,8 +173,7 @@ Attestation Management
 
+--------------------+---------------------------------------------------------------+
 |**Data Params**     |none                                                     
      |
 
+--------------------+---------------------------------------------------------------+
-|**Success Response**|[{"value":"*value*", "name":"*name*",                    
      |
-|                    |  "type": "*type*", "id": "*id*"},...]                   
      |
+|**Success Response**|``Attestation[]``                                        
      |
 
+--------------------+---------------------------------------------------------------+
 |**Error Response**  | {"error":"*error_desc*"} :sup:`2`                       
      |
 
+--------------------+---------------------------------------------------------------+
@@ -157,8 +191,7 @@ Attestation Management
 
+--------------------+----------------------------------------------------------------+
 |**URL Params**      |none                                                     
       |
 
+--------------------+----------------------------------------------------------------+
-|**Data Params**     |{"value":"*value*", "name":"*name*",                     
       |
-|                    | "type": "*type*", "id": "*id*"}                         
       |
+|**Data Params**     |``Attestation``                                          
       |
 
+--------------------+----------------------------------------------------------------+
 |**Success Response**|Response Code: :literal:` b) 200 OK`                     
       |
 
+--------------------+----------------------------------------------------------------+
@@ -183,66 +216,6 @@ Attestation Management
 |**Error Response**  | {"error":"*error_desc*"} :sup:`2; 5`                    
      |
 
+--------------------+---------------------------------------------------------------+
 
-Attestation Reference Management
---------------------------------
-
-+--------------------+---------------------------------------------------------------+
-|**Title**           |Returns all attestation references for an identity       
      |
-+--------------------+---------------------------------------------------------------+
-|**URL**             |:literal:`/reclaim/attestation/reference/'ego'`          
      |
-+--------------------+---------------------------------------------------------------+
-|**Method**          |**GET**                                                  
      |
-+--------------------+---------------------------------------------------------------+
-|**URL Params**      |none                                                     
      |
-+--------------------+---------------------------------------------------------------+
-|**Data Params**     |none                                                     
      |
-+--------------------+---------------------------------------------------------------+
-|**Success Response**|[{"ref_value":"*ref_value*", "name":"*name*",            
      |
-|                    |  "ref_id": "*ref_id*", "id": "*id*"},...]               
      |
-+--------------------+---------------------------------------------------------------+
-|**Error Response**  | {"error":"*error_desc*"} :sup:`2`                       
      |
-+--------------------+---------------------------------------------------------------+
-|**Attention**       | The response in this request is an array.               
      |
-+--------------------+---------------------------------------------------------------+
-
-|
-
-+--------------------+----------------------------------------------------------------+
-|**Title**           |Add an attestation reference to an identity              
       |
-+--------------------+----------------------------------------------------------------+
-|**URL**             |:literal:`/reclaim/attestation/reference/'ego'`          
       |
-+--------------------+----------------------------------------------------------------+
-|**Method**          |**POST**                                                 
       |
-+--------------------+----------------------------------------------------------------+
-|**URL Params**      |none                                                     
       |
-+--------------------+----------------------------------------------------------------+
-|**Data Params**     |{"ref_value":"*ref_value*", "name":"*name*",             
       |
-|                    | "ref_id": "*ref_id*", "id": "*id*"}                     
       |
-+--------------------+----------------------------------------------------------------+
-|**Success Response**|Response Code: :literal:` b) 200 OK`                     
       |
-+--------------------+----------------------------------------------------------------+
-|**Error Response**  | {"error":"*error_desc*"} :sup:`2; 3 or 4`               
       |
-+--------------------+----------------------------------------------------------------+
-
-|
-
-+--------------------+---------------------------------------------------------------+
-|**Title**           |Delete an attestation reference from an identity         
      |
-+--------------------+---------------------------------------------------------------+
-|**URL**             |:literal:`/reclaim/attestation/reference/'ego'/'id'`     
      |
-+--------------------+---------------------------------------------------------------+
-|**Method**          |**DELETE**                                               
      |
-+--------------------+---------------------------------------------------------------+
-|**URL Params**      |none                                                     
      |
-+--------------------+---------------------------------------------------------------+
-|**Data Params**     |{"ref_value":"*ref_value*", "name":"*name*",             
      |
-|                    | "ref_id": "*ref_id*", "id": "*id*"}                     
      |
-+--------------------+---------------------------------------------------------------+
-|**Success Response**|Response Code: :literal:` b) 200 OK`                     
      |
-+--------------------+---------------------------------------------------------------+
-|**Error Response**  | {"error":"*error_desc*"} :sup:`2; 5`                    
      |
-+--------------------+---------------------------------------------------------------+
-
 Ticket Management
 -----------------
 
@@ -257,7 +230,7 @@ Ticket Management
 
+--------------------+---------------------------------------------------------------+
 |**Data Params**     |none                                                     
      |
 
+--------------------+---------------------------------------------------------------+
-|**Success Response**|[{“issuer”: “key”, “audience”: “key”, “rnd”: “id”},...]  
      |
+|**Success Response**|``Ticket[]``                                             
      |
 
+--------------------+---------------------------------------------------------------+
 |**Error Response**  | | {"error":"*error_desc*"} :sup:`6; 7`                  
      |
 
+--------------------+---------------------------------------------------------------+
@@ -273,7 +246,7 @@ Ticket Management
 
+--------------------+---------------------------------------------------------------+
 |**URL Params**      |none                                                     
      |
 
+--------------------+---------------------------------------------------------------+
-|**Data Params**     |{"issuer": "*key*", "audience": "*key*", "rnd": "*id*"}  
      |
+|**Data Params**     |``Ticket``                                               
      |
 
+--------------------+---------------------------------------------------------------+
 |**Success Response**| Response Code: :literal:` b) 200 OK`                    
      |
 
+--------------------+---------------------------------------------------------------+
@@ -291,10 +264,9 @@ Ticket Management
 
+--------------------+---------------------------------------------------------------+
 |**URL Params**      |none                                                     
      |
 
+--------------------+---------------------------------------------------------------+
-|**Data Params**     |{"issuer": "*key*", "audience": "*key*", "rnd": "*id*"}  
      |
+|**Data Params**     |``Ticket``                                               
      |
 
+--------------------+---------------------------------------------------------------+
-|**Success Response**|[{"value":"*value*", "name":"*name*",                    
      |
-|                    |  "type": "*type*", "id": "*id*"},...]                   
      |
+|**Success Response**|``Attribute[]``                                          
      |
 
+--------------------+---------------------------------------------------------------+
 |**Error Response**  | | {"error":"*error_desc*"} :sup:`6; 7`                  
      |
 
+--------------------+---------------------------------------------------------------+

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



reply via email to

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