get-monitoring-historic-denomination-revenue.rst (2435B)
1 .. http:get:: /monitoring/historic-denomination-revenues 2 3 Get a list of historic denomination revenue 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 Pagination follows the :ref:`row-id-pagination` convention. The non-zero signed 10 ``limit`` defaults to ``-20``. 11 12 :query limit: Optional non-zero signed number of records; negative values request descending row IDs. 13 :query offset: Optional :ts:type:`SafeUint64` row ID from which to begin. 14 15 With the default settings, the endpoint returns at most the 20 latest elements. 16 17 **Response:** 18 19 :http:statuscode:`200 OK`: 20 The auditor responds with a :ts:type:`HistoricDenominationRevenueResponse` object. Its ``records`` field is empty if no matching elements were found. 21 :http:statuscode:`400 Bad request`: 22 The request is malformed. Returned with an 23 ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` error code. 24 :http:statuscode:`401 Unauthorized`: 25 The request lacks valid authentication credentials. 26 The response comes with a ``TALER_EC_AUDITOR_GENERIC_UNAUTHORIZED``. 27 :http:statuscode:`500 Internal Server Error`: 28 The server experienced an internal error. 29 The response comes with a ``TALER_EC_GENERIC_DB_SETUP_FAILED``, 30 ``TALER_EC_GENERIC_DB_FETCH_FAILED``, or 31 ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE`` error code. 32 33 **Details:** 34 35 .. ts:def:: HistoricDenominationRevenueResponse 36 37 interface HistoricDenominationRevenueResponse { 38 39 records: HistoricDenominationRevenue[]; 40 41 } 42 43 .. ts:def:: HistoricDenominationRevenue 44 45 interface HistoricDenominationRevenue { 46 47 // Unique row identifier 48 row_id : SafeUint64; 49 50 // Hash code of the denomination public key involved 51 h_denom_pub : HashCode; 52 53 // Time when the denomination expired and thus the revenue 54 // was computed. 55 revenue_timestamp : Timestamp; 56 57 // Total fee revenue the exchange earned from coins of this 58 // denomination. 59 revenue_balance : Amount; 60 61 // Total losses the exchange experienced from this denomination 62 // (this basically only happens if someone was able to forge 63 // denomination signatures). So non-zero values are indicative 64 // of a serious problem. 65 loss_balance : Amount; 66 67 } 68 69 .. note:: 70 71 This endpoint is still experimental. The endpoint will be further developed as needed.