Suggestion/comment from ssmehta:
One possible issue I see is that large queries of many thousands of spectra may fail due to the depending on the timeout set. One option is to use pagination and build the result set locally. This is done using the "page" and "size" query parameters (note that results start at page 0). This also can reduce load on the server since if large queries are started but cancelled by the client, it can continue to run on the server-side.
Suggestion/comment from ssmehta: