According to RFC 7233, the Range header units are extensible, although the only official values are "bytes" and "none".
I was wondering if anyone has made a range unit of say "objects", where a resource representing a sequence of data objects will return a subset of those objects when the range header is given.
For example, a /events endpoint which would return all 1,000 entries in a JSON array on a normal GET would return just the ten most recent given a header of
Range: objects=-10
which would return a JSON array of just those entries, e.g.
206 Partial Content HTTP/1.1
Content-Range: objects 990-999/1000
Has anyone seen API which do such a thing?
-David Waite