is-04
is-04 copied to clipboard
Consider adding a mechanism to make pagination opt-in for clients
Originally posted by @garethsb-sony in https://github.com/AMWA-TV/nmos-discovery-registration/issues/79#issuecomment-467830923
I.e.
/nodes?foo=bar
with no paging
parameters must return all matching resources (even from a Query API that implements pagination), which may be unordered, but a response of (probably) 501 is permitted if that operation would be too intensive.
/nodes?foo=bar&paging.limit=100
would opt into the 'paging' trait specification and return the first 100 matching resources (or fewer, including if the server's maximum limit is less), ordered as specified.
The problem with this is that for clients that support pagination but don't know whether a Query API supports pagination, either have to try without paging
parameters, and then retry with if they get a 501, or try first with paging
parameters, and then retry without if they got a 501 from that (because v1.3+ implementations should return 501 if they don't support them...).
I can't immediately see how to fix that.