taler-docs

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

get-public-accounts.rst (1953B)


      1 .. http:get:: /public-accounts
      2 
      3   Show those accounts whose histories are publicly visible.  For example,
      4   accounts from donation receivers.  As such, this request is unauthenticated.
      5 
      6   A public account exposes its balance and payto URI here, and its complete
      7   existing and future transaction records through
      8   ``GET /accounts/$USERNAME/transactions``.  Complete records include subjects
      9   and both debtor and creditor payto URIs.  No transaction fields are redacted.
     10 
     11   **Request:**
     12 
     13   :query limit: *Optional.*
     14     At most return the given number of results. Negative for descending by ``row_id``, positive for ascending by ``row_id``. Defaults to ``-20``. Since **v5**.
     15   :query offset: *Optional.*
     16     Starting ``row_id`` for :ref:`pagination <row-id-pagination>`. Since **v5**.
     17   :query filter_name: *Optional.*
     18     Pattern to filter on the account's legal name.  Given
     19     the filter 'foo', all the results will **contain**
     20     'foo' in their legal name.  Without this option,
     21     all the existing accounts are returned.
     22   :query delta: *Optional.*
     23     Deprecated since **v5**. Use *limit* instead.
     24   :query start: *Optional.*
     25     Deprecated since **v5**. Use *offset* instead.
     26 
     27   **Response:**
     28 
     29   :http:statuscode:`200 OK`:
     30     Response is a `PublicAccountsResponse`.
     31   :http:statuscode:`204 No content`:
     32     No public account.
     33 
     34   **Details:**
     35 
     36   .. ts:def:: PublicAccountsResponse
     37 
     38     interface PublicAccountsResponse {
     39       public_accounts: PublicAccount[];
     40     }
     41 
     42   .. ts:def:: PublicAccount
     43 
     44     interface PublicAccount {
     45       // Username of the account
     46       username: Slug;
     47 
     48       // Full payto URI of this bank account.
     49       payto_uri: string;
     50 
     51       // Current balance of the account
     52       balance: Balance;
     53 
     54       // Is this a taler exchange account?
     55       is_taler_exchange: boolean;
     56 
     57       // Opaque unique ID used for pagination.
     58       // @since **v4**, will become mandatory in the next version.
     59       row_id?: Integer;
     60     }