-
Type: Improvement
-
Status: New
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: V4.01_CS01
-
Fix Version/s: V4.02
-
Component/s: URL Conventions
-
Labels:None
Using an HTTP Prefer header for client's preferred odata.pagesize is problematic, particularly when the client-specified query URL uses $expand.
While a server is free to ignore any client-specified pagesize, it is beneficial to be able to have the client indicate their preference for each "node" in a URL using that has one or more $expands, so that the server (if it is agreeable) may respect the client's intentions.
Suggestion is to introduce $pagesize system query option (a positive integer). Where present in the outermost level of a query (not inside a $expand) it would take preference over odata.pagesize in HTTP Prefer header.
Nested $pagesize would apply to $expand, e.g.
Customer?$pagesize=100&$expand=Orders($pagesize=10)
requests up to 100 customers each with up to 10 orders.
If a returned customer has some orders with a next-link, then following that next-link is not required to use the same $pagesize of 10. It only applies to the originally-returned nested orders.