Is there a way to increase number of results returned via asset API?

I’m currently on NXRM OSS 3.16.1-02, is there a way to increase the number of results returned by the asset api? It currently returns only 10 results at a time which is really slow for our repo of 75k packages.

Hello @jared.m.barboza, have you implemented the pagination in your API interaction code? I did so for a Python script and I get all results returned from one query using my Python script. Here is a link to the pagination help page: Pagination

I put my query in a do loop, append the results to a dictionary, and exit the loop when the continuation token is None / Null. Then print the contents of the dictionary. Works great.

I will necropost a little, but still…
Is there a really any way to increase response from 1 request much more than 10 elements?
With big repositories (imagine that you have around 100k packages) it will take a huge amount of time even if someone will use you advise (literraly for now it is the only way to get all packages from the repo. At least for know).

Still if it is configurable somehow I think you can imagine how much faster you can get all packages if 1 response will return 100\500\1000 elements per request :slight_smile:

And because of token mechanism you can’t parallel this =\

Fair point. I don’t think they’ve changed it to make the return size customizable.

I wonder if you could make fast requests just to get all of the pagination tokens, then parallelize downloading the packages with the list of tokens. Not sure if that would be faster than downloading 10 at a time.

It won’t.
If there was a pagination mechanism that works with skip\take - you could parallel your task. But still, you need to know how many exactly packages you have in the repository. As far as I know, nexus doesn’t provide such information.

And the only way to make it faster is to increase the number of elements that return per request.