bamaer opened a new issue, #9548: URL: https://github.com/apache/hop/issues/9548
### What would you like to happen? `PAGE_NUMBER` pagination on a REST connection always starts at page 1: `PaginationState.pageNumber` is initialised to 1 ([Rest.java:167](https://github.com/apache/hop/blob/39b3d636b2e003ab9e857eb385f549cbc3e9248c/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java#L167)) and nothing on the connection changes it. APIs with zero-based page numbers lose their first page without an error. The Ironclad public API is one example: `GET /workflows` takes `page` (zero-based, default 0) and `pageSize` (1-100, default 20), so the first request Hop sends is the second page. `PAGE_NUMBER` also never sends a page-size parameter. `resolvePagingLimit` ([Rest.java:1007](https://github.com/apache/hop/blob/39b3d636b2e003ab9e857eb385f549cbc3e9248c/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java#L1007)) applies the limit only to `OFFSET_LIMIT`, `BODY_CURSOR` and `HEADER_CURSOR`, so the page size has to be added to the URL by hand. Proposal: - Add a "First page number" option to the REST connection (default 1, so existing connections keep their behaviour) and start the page counter from it. - Let `PAGE_NUMBER` send the existing limit parameter name and default limit when they are filled in. - Add both options to the REST connection editor and the docs. Tests: an Ironclad-style endpoint in the `paging` nginx mock (`docker/integration-tests/resource/http/paging/paging.conf`) with a zero-based `page`, a `{page, pageSize, count, list}` envelope and `list: []` past the end, plus an integration test next to `0035-rest-pagination-page-number` that expects all items exactly once. ### Issue Priority Priority: 2 ### Issue Component Component: Metadata, Component: Transforms -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
