taler-docs

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

get-monitor.rst (4240B)


      1 .. http:get:: /monitor
      2 
      3   When the bank provides conversion between the local currency and an
      4   external one, this call lets the bank administrator monitor the cashin
      5   and cashout operations that were made from and to the external currency.
      6   It shows as well figures related to internal payments made by a Taler
      7   exchange component to internal bank accounts. Timeframes are in UTC.
      8 
      9   **Request:**
     10 
     11   :query timeframe: *Optional*.
     12     This parameter admits one of the following values. Defaults to 'hour'.
     13 
     14     * hour
     15     * day
     16     * month
     17     * year
     18 
     19   :query date_s: *Optional*.
     20     Non-negative date in seconds after the UNIX Epoch. Defaults to current time.
     21     @since **v4**
     22 
     23   :query which: *Optional*.
     24     This parameter points at a particular element of the *timeframe* parameter.
     25     Following are the admitted values for each one.
     26     Defaults to the last snapshot taken of the *timeframe* parameter.
     27     @deprecated since **v4**
     28 
     29     * hour: from 00 to 23
     30     * day: from 1 to the last day of the current month.
     31     * month: from 1 to 12
     32     * year: Gregorian year in the YYYY format.
     33 
     34   **Response:**
     35 
     36   :http:statuscode:`200 OK`:
     37     The bank responds with `MonitorResponse`.
     38   :http:statuscode:`400 Bad Request`:
     39     This error may indicate that the *which* parameter is not appropriate for the selected *timeframe*.  For example, timeframe=month and which=20 would result in this error.
     40   :http:statuscode:`401 Unauthorized`:
     41     Invalid or missing credentials.
     42   :http:statuscode:`403 Forbidden`:
     43     Missing rights.
     44 
     45   **Details:**
     46 
     47   .. note::
     48 
     49     API consumers may combine the values in the response with other
     50     factors to serve different views to their users.
     51 
     52   .. ts:def:: MonitorResponse
     53 
     54     // Union discriminated by the "type" field.
     55     type MonitorResponse =
     56       | MonitorNoConversion
     57       | MonitorWithConversion;
     58 
     59   .. ts:def:: MonitorNoConversion
     60 
     61     // Monitoring stats when conversion is not supported
     62     interface MonitorNoConversion {
     63       type: "no-conversions";
     64 
     65       // How many payments were made to a Taler exchange by another
     66       // bank account.
     67       talerInCount: Integer;
     68 
     69       // Overall volume that has been paid to a Taler
     70       // exchange by another bank account.
     71       talerInVolume: Amount;
     72 
     73       // How many payments were made by a Taler exchange to another
     74       // bank account.
     75       talerOutCount: Integer;
     76 
     77       // Overall volume that has been paid by a Taler
     78       // exchange to another bank account.
     79       talerOutVolume: Amount;
     80     }
     81 
     82   .. ts:def:: MonitorWithConversion
     83 
     84     // Monitoring stats when conversion is supported
     85     interface MonitorWithConversion {
     86       type: "with-conversions";
     87 
     88       // How many cashin operations were confirmed by a
     89       // wallet owner. Note: wallet owners
     90       // are NOT required to be customers of the libeufin-bank.
     91       cashinCount: Integer;
     92 
     93       // Overall regional currency that has been paid by the regional admin account
     94       // to regional bank accounts to fulfill all the confirmed cashin operations.
     95       cashinRegionalVolume: Amount;
     96 
     97       // Overall fiat currency that has been paid to the fiat admin account
     98       // by fiat bank accounts to fulfill all the confirmed cashin operations.
     99       cashinFiatVolume: Amount;
    100 
    101       // How many cashout operations were confirmed.
    102       cashoutCount: Integer;
    103 
    104       // Overall regional currency that has been paid to the regional admin account
    105       // by fiat bank accounts to fulfill all the confirmed cashout operations.
    106       cashoutRegionalVolume: Amount;
    107 
    108       // Overall fiat currency that has been paid by the fiat admin account
    109       // to fiat bank accounts to fulfill all the confirmed cashout operations.
    110       cashoutFiatVolume: Amount;
    111 
    112       // How many payments were made to a Taler exchange by another
    113       // bank account.
    114       talerInCount: Integer;
    115 
    116       // Overall volume that has been paid to a Taler
    117       // exchange by another bank account.
    118       talerInVolume: Amount;
    119 
    120       // How many payments were made by a Taler exchange to another
    121       // bank account.
    122       talerOutCount: Integer;
    123 
    124       // Overall volume that has been paid by a Taler
    125       // exchange to another bank account.
    126       talerOutVolume: Amount;
    127     }