Pagination
All GET
methods that return collections are paginated (with the exception of the search_transactions end point - see below). The response will resemble:
{
"key": [...],
"lastKey": "..."
}
If lastKey
is not present it means this is the final page of results.
If lastKey
is present it means that more results may be available and can be retrieved by making the same request but with an additional start_key
query parameter that has the value of this last key.
The size of a page can be altered with the per_page
parameter. The maximum number for per_page
is 1,000. The default is 100.
There is a data size limit too (approximately 6MB). This may be hit before the page limit. In this case reduce the number of items requested. In some circumstances adding the header "Accept-Encoding: gzip" to a request will allow more data to be transferred in one page.
Search pagination
The /search_transactions end point operates differently. Instead of a start_key
it uses an offset
parameter. This is the number of items into the search to start from. It is usually a multiple of the per_page
. E.g. set offset
to 100 to get the second page of results (assuming per_page is 100).
NB. The search and aggregation functions are for reporting only as there may be a small lag between these results and the live data.
Updated 1 day ago