My OData query is returning a limited number of results. It seems to stop at 25. Why is this, and how can I make it return the full resultset?
As you found out, the maximum number of results is 25 by default, and that is controlled via the cd_webservice_conf.xml file.
You can turn the limit OFF completely, by setting it to 0
But I strongly advise against this, as you don't know who the next developer is on your server, and whether he'll understand that there is a performance penalty to retrieving 200K items from the service.
A much better approach, in my view, is to use the $top query option for the particular queries where you need more than %default% results. If you really want to get everything in your query, then use
The max number of results to return is configurable in
cd_webservice_conf.xml. It contains the element
DefaultTop which controls this:
<!-- OData specific settings. The default top value that will be used if the client doesn't specify one. The fixed publication id to use in the friendly URL, this allows only one publication to be queried through the friendly URL filter. --> <OData> <DefaultTop>25</DefaultTop> <FixedPublicationId>1</FixedPublicationId> </OData>
So if you don't want a limit, then simply set DefaultTop to some ridiculously high number. But be warned, the response may take a really long time to download if you have a large number of items and ask to return all them.