taler-docs

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

get-monitoring-balances.rst (1399B)


      1 .. http:get:: /monitoring/balances
      2 
      3   Get a list of balances stored by the auditor.
      4 
      5   The following query parameters are optional, and can be used to customise the response:
      6 
      7   **Request:**
      8 
      9   :query balance_key: a string identifying a balance. If specified, only returns the balance with this exact key. The default value is NULL.
     10 
     11   **Response:**
     12 
     13   :http:statuscode:`200 OK`:
     14     The auditor responds with a :ts:type:`BalancesResponse` object. Its ``records`` field is empty if no matching elements were found.
     15   :http:statuscode:`400 Bad request`:
     16     The request is malformed. Returned with an
     17     ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` error code.
     18   :http:statuscode:`401 Unauthorized`:
     19     The request lacks valid authentication credentials.
     20     The response comes with a ``TALER_EC_AUDITOR_GENERIC_UNAUTHORIZED``.
     21   :http:statuscode:`500 Internal Server Error`:
     22     The server experienced an internal error.
     23     The response comes with a ``TALER_EC_GENERIC_DB_SETUP_FAILED``,
     24     ``TALER_EC_GENERIC_DB_FETCH_FAILED``, or
     25     ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE`` error code.
     26 
     27   **Details:**
     28 
     29   .. ts:def:: BalancesResponse
     30 
     31     interface BalancesResponse {
     32 
     33       records: Balances[];
     34 
     35     }
     36 
     37   .. ts:def:: Balances
     38 
     39     interface Balances {
     40 
     41       // String identifying a balance
     42       balance_key : string;
     43 
     44       // Amount of the balance
     45       balance_value : Amount;
     46 
     47     }