get-monitoring-historic-reserve-summary.rst (2007B)
1 .. http:get:: /monitoring/historic-reserve-summaries 2 3 Get a list of historic reserve summary 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:`HistoricReserveSummaryResponse` 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:: HistoricReserveSummaryResponse 36 37 interface HistoricReserveSummaryResponse { 38 39 records: HistoricReserveSummary[]; 40 41 } 42 43 .. ts:def:: HistoricReserveSummary 44 45 interface HistoricReserveSummary { 46 47 // Unique row identifier 48 row_id : SafeUint64; 49 50 // From when the summary starts 51 start_date : Timestamp; 52 53 // When the summary ends 54 end_date : Timestamp; 55 56 // Profits the exchange charged for the reserve 57 reserve_profits : Amount; 58 59 } 60 61 .. note:: 62 63 This endpoint is still experimental. The endpoint will be further developed as needed.