get-monitoring-purses.rst (1990B)
1 .. http:get:: /monitoring/purses 2 3 Get a list of purses 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:`PursesResponse` 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:: PursesResponse 36 37 interface PursesResponse { 38 39 records: Purses[]; 40 41 } 42 43 .. ts:def:: Purses 44 45 interface Purses { 46 47 // Unique row identifier 48 auditor_purses_rowid : SafeUint64; 49 50 // Public key of the purse 51 purse_pub : EddsaPublicKey; 52 53 // Amount currently stored in the purse 54 balance : Amount; 55 56 // Amount the purse is intended for / the maximum amount that can be in the purse 57 target : Amount; 58 59 // When the purse expires 60 expiration_date : Timestamp; 61 62 } 63 64 .. note:: 65 66 This endpoint is still experimental. The endpoint will be further developed as needed.