File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ Features:
34
34
roundup-gettext will extract translatable strings from the tracker's
35
35
Python code. If polib is missing, it will print a warning. (Patch
36
36
Marcus Priesch, cleanup to remove python 2 issues, John Rouillard.)
37
+ - issue2551315 - Document use of
38
+ RestfulInstance.max_response_row_size to limit data returned
39
+ from rest request.
37
40
38
41
2024-07-13 2.4.0
39
42
Original file line number Diff line number Diff line change @@ -151,6 +151,28 @@ burst count. On slower hardware, errors of up to 10% have been
151
151
observed. Using redis, PostgreSQL, or MySQL for storing ephemeral data
152
152
minimizes the loss.
153
153
154
+ Limit Size of Returned Data
155
+ ---------------------------
156
+
157
+ When selecting from the database, you can limit the number of rows
158
+ returned by adding the following to `interfaces.py`_::
159
+
160
+ from roundup.rest import RestfulInstance
161
+ RestfulInstance.max_response_row_size = 26
162
+
163
+ This will limit the setting of ``@page_size`` to 25 (one less than the
164
+ value). If the url includes a ``@page_size`` pagination value greater
165
+ than or equal to the ``max_response_row_size`` you will receive an
166
+ error like::
167
+
168
+ {
169
+ "error": {
170
+ "status": 400,
171
+ "msg": "Page size 30 must be less than admin limit on query
172
+ result size: 26."
173
+ }
174
+ }
175
+
154
176
Client API
155
177
==========
156
178
You can’t perform that action at this time.
0 commit comments