taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

get-private-groups.rst (1510B)


      1 .. http:get:: [/instances/$INSTANCE]/private/groups
      2 
      3   This is used to return all the groups
      4   that are present in our backend.
      5 
      6   **Required permission:** ``groups-read``
      7 
      8   **Request:**
      9 
     10   :query limit: *Optional.*
     11     At most return the given number of results. Negative for descending by ``serial``, positive for ascending by ``serial``. Defaults to ``-20``.
     12   :query offset: *Optional.*
     13     Starting ``serial`` for :ref:`pagination <row-id-pagination>`.
     14 
     15   **Response:**
     16 
     17   :http:statuscode:`200 OK`:
     18     The backend has successfully returned all the groups.
     19     Returns a `GroupsSummaryResponse`.
     20 
     21   :http:statuscode:`400 Bad Request`:
     22     A query parameter is malformed.
     23     Returned with ``TALER_EC_GENERIC_PARAMETER_MALFORMED``.
     24   :http:statuscode:`404 Not found`:
     25     The backend has does not know about the instance.
     26   :http:statuscode:`500 Internal Server Error`:
     27     The server experienced an internal failure.
     28     Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``.
     29 
     30   **Details:**
     31 
     32   .. ts:def:: GroupsSummaryResponse
     33 
     34     interface GroupsSummaryResponse {
     35 
     36       // Return groups that are present in our backend.
     37       groups: GroupEntry[];
     38 
     39     }
     40 
     41   The `GroupEntry` object describes a group.
     42   It has the following structure:
     43 
     44   .. ts:def:: GroupEntry
     45 
     46     interface GroupEntry {
     47 
     48       // Group identifier
     49       group_serial: Integer;
     50 
     51       // Unique name for the group (unique per instance).
     52       group_name: string;
     53 
     54       // Description for the group.
     55       description: string;
     56 
     57     }