The GET /datasets response is optimized for sequential pagination, providing a convenient "next_url" string that can be used directly. However if a client wants to support "random access" pagination, this requires that the client parses the URL string in order to modify the offset parameter.
This attempts to make that a bit easier by supplementing the current response payload with a parameters field containing the query parameters JSON object, making it easy to update the offset parameter.
(Making the unit tests work against the normalized parameter list proved a bit challenging and I ended up saving the original "raw" client parameters in the API context so they can be used directly.)
PBENCH-1133
The
GET /datasets
response is optimized for sequential pagination, providing a convenient "next_url" string that can be used directly. However if a client wants to support "random access" pagination, this requires that the client parses the URL string in order to modify theoffset
parameter.This attempts to make that a bit easier by supplementing the current response payload with a
parameters
field containing the query parameters JSON object, making it easy to update theoffset
parameter.(Making the unit tests work against the normalized parameter list proved a bit challenging and I ended up saving the original "raw" client parameters in the API
context
so they can be used directly.)