Open juliusknorr opened 7 months ago
For tables there are already endpoints on the Api1 Controller that support pagination:
$ ack indexTableRows
appinfo/routes.php
46: ['name' => 'api1#indexTableRowsSimple', 'url' => '/api/1/tables/{tableId}/rows/simple', 'verb' => 'GET'],
47: ['name' => 'api1#indexTableRows', 'url' => '/api/1/tables/{tableId}/rows', 'verb' => 'GET'],
lib/Controller/Api1Controller.php
909: public function indexTableRowsSimple(int $tableId, ?int $limit, ?int $offset): DataResponse {
939: public function indexTableRows(int $tableId, ?int $limit, ?int $offset): DataResponse {
It seems to be unused by the frontend though, there RowController::index()
is being called. Might be even a drop-in replacement.
The same is acutally valid for Views. The Api1 Controller supports pagination:
$ ack indexViewRows
appinfo/routes.php
48: ['name' => 'api1#indexViewRows', 'url' => '/api/1/views/{viewId}/rows', 'verb' => 'GET'],
lib/Controller/Api1Controller.php
969: public function indexViewRows(int $viewId, ?int $limit, ?int $offset): DataResponse {
but RowController::indexView
is used.
If the frontend cannot use the routes of Ap1Controller, we can easily add the optional arguments as the same service methods are being used..
We need to get an overview how complex adding pagination for row results from tables/views is, given that views are filtered on the backend.