How to set page size on sonatype nexus3 api?
Asked Answered
T

0

7

I've been searching around on how to deal with pagination of nexus as documented in here https://help.sonatype.com/repomanager3/rest-and-integration-api/pagination

However there is no mention on how to set pagination and I can't find if it's a server configuration or if there is any way to set it to an arbitrary number or disable it altogether.

It seems really odd that they chose to mention a page size and I can't find any reference to said page size anywhere except that I know it's there. e.g. for search api it seems to be set to 50.

Terhune answered 5/9, 2018 at 9:14 Comment(4)
It isn't possible to do that. Pagination is put in place to protect the stability of Nexus, if arbitrarily large page sizes were allowed it could result in response sizes that are so large they could cause failures.Mac
regardless of it there were a limit or not on how big it can be, there is a mention of a page size and no reference to what number it is, or if it's fixed or if you can set it either per call or serverside or what, there is just no information, I can understand there may be a slight difference but I don't think making me write a script to chain continuationTokens is going to hammer the server less than a big payload, it's just going to make everybody's code more complex, in any case, the problem is there seems to be some indication that "page size" is a thing, it's just not documentedTerhune
Server performance are matter of performance settings (JVM settings and machine resources) not developpers ... If I have a huge server, it is ridiculous to have small page size. Moreover, page size is the same for components, assets, component search and asset search while response size varies between each. Having only 10 assets per request is ridiculous ...Grane
@rseddon, in case you are still involved with Sonatype: Could you perhaps outline the issues that could arise from a larger result window (given users have sufficiently powerful machines) and comment on the status of github.com/sonatype/nexus-public/pull/51? It seems very unintuitive that a repo server using a powerful, well-understood search engine like Elastic would need to resort to such a tiny result window to ensure stable operations.Movable

© 2022 - 2024 — McMap. All rights reserved.