get-monitoring-reserves.rst (2906B)
1 .. http:get:: /monitoring/reserves 2 3 Get a list of reserves 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 16 With the default settings, the endpoint returns at most the 20 latest elements. 17 18 **Response:** 19 20 :http:statuscode:`200 OK`: 21 The auditor responds with a :ts:type:`ReservesResponse` object. Its ``records`` field is empty if no matching elements were found. 22 :http:statuscode:`400 Bad request`: 23 The request is malformed. Returned with an 24 ``TALER_EC_GENERIC_PARAMETER_MALFORMED`` error code. 25 :http:statuscode:`401 Unauthorized`: 26 The request lacks valid authentication credentials. 27 The response comes with a ``TALER_EC_AUDITOR_GENERIC_UNAUTHORIZED``. 28 :http:statuscode:`500 Internal Server Error`: 29 The server experienced an internal error. 30 The response comes with a ``TALER_EC_GENERIC_DB_SETUP_FAILED``, 31 ``TALER_EC_GENERIC_DB_FETCH_FAILED``, or 32 ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE`` error code. 33 34 35 **Details:** 36 37 .. ts:def:: ReservesResponse 38 39 interface ReservesResponse { 40 41 records: Reserves[]; 42 43 } 44 45 .. ts:def:: Reserves 46 47 interface Reserves { 48 49 // Unique row identifier 50 auditor_reserves_rowid : SafeUint64; 51 52 // Public key of the reserve 53 reserve_pub : EddsaPublicKey; 54 55 // Amount in the balance 56 reserve_balance : Amount; 57 58 // Reserve losses are incurred if (a) a reserve is 59 // incorrectly credited from a recoup for a non-revoked 60 // coin, or (b) if the exchange allowed more digital cash 61 // to be withdrawn from a reserve than the balance of the 62 // reserve should have permitted. FIXME: We may want to 63 // distinguish these two cases in the future. 64 reserve_loss : Amount; 65 66 // Amount earned by charging withdraw fees 67 withdraw_fee_balance : Amount; 68 69 // Amount earned by charging a closing fee on the reserve 70 close_fee_balance : Amount; 71 72 // Total purse fees earned from this reserve 73 purse_fee_balance : Amount; 74 75 // Total reserve open fees earned from the reserve 76 open_fee_balance : Amount; 77 78 // Total reserve history fees earned from this reserve 79 history_fee_balance : Amount; 80 81 // When the purse expires 82 expiration_date : Timestamp; 83 84 // Who created the reserve. 85 // Full payto:// URI of the originating account. 86 // Optional, NULL if unknown. 87 origin_account? : string; 88 89 } 90 91 .. note:: 92 93 This endpoint is still experimental. The endpoint will be further developed as needed.