get-private-pots.rst (1196B)
1 .. http:get:: [/instances/$INSTANCES]/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:`404 Not found`: 22 The backend has does not know about the instance. 23 24 **Details:** 25 26 .. ts:def:: PotsSummaryResponse 27 28 interface PotsSummaryResponse { 29 30 // Return pots that are present in our backend. 31 pots: PotEntry[]; 32 33 } 34 35 The `PotEntry` object describes a pot. 36 It has the following structure: 37 38 .. ts:def:: PotEntry 39 40 interface PotEntry { 41 42 // Pot identifier 43 pot_serial: Integer; 44 45 // Name of the pot. Must be unique per instance. 46 pot_name: string; 47 48 // Current total amounts in the pot. 49 pot_totals: Amount[]; 50 51 }