get-private-pots.rst (1481B)
1 .. http:get:: [/instances/$INSTANCE]/private/pots 2 3 This is used to return all the pots 4 that are present in our backend. 5 6 **Required permission:** ``pots-read`` 7 8 **Request:** 9 10 :query limit: *Optional.* 11 At most return the given number of results. Negative for descending by ``serial``, positive for ascending by ``serial``. Defaults to ``-20``. 12 :query offset: *Optional.* 13 Starting ``serial`` for :ref:`pagination <row-id-pagination>`. 14 15 **Response:** 16 17 :http:statuscode:`200 OK`: 18 The backend has successfully returned all the pots. 19 Returns a `PotsSummaryResponse`. 20 21 :http:statuscode:`400 Bad Request`: 22 A query parameter is malformed. 23 Returned with ``TALER_EC_GENERIC_PARAMETER_MALFORMED``. 24 :http:statuscode:`404 Not found`: 25 The backend has does not know about the instance. 26 :http:statuscode:`500 Internal Server Error`: 27 The server experienced an internal failure. 28 Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 29 30 **Details:** 31 32 .. ts:def:: PotsSummaryResponse 33 34 interface PotsSummaryResponse { 35 36 // Return pots that are present in our backend. 37 pots: PotEntry[]; 38 39 } 40 41 The `PotEntry` object describes a pot. 42 It has the following structure: 43 44 .. ts:def:: PotEntry 45 46 interface PotEntry { 47 48 // Pot identifier 49 pot_serial: Integer; 50 51 // Name of the pot. Must be unique per instance. 52 pot_name: string; 53 54 // Current total amounts in the pot. 55 pot_totals: Amount[]; 56 57 }