Forum Discussion
Pagination Sophos API
Thanks.
From the Sophos APi documentation:
PAGE BY OFFSET
When paging by offset, the client asks for the specific page of data they want, starting from Page 1. The query parameters that affect paging are:
page, pageSize [Integer]
pageTotal [Boolean]
The pages field in the response will have the following sub-fields:
current [Integer] The 1-based page number being returned
size [Integer] Same as the pageSize query parameter passed in.
total [Integer] The total number of pages that exist
All query parameters are optional. By default, if you don't specify a query parameter, the first page with up to 50 items on it is returned. The number of pages isn't returned.PAGE BY KEY
When paging by key, the client asks for a page worth of data after a particular matching key. You can omit this key to fetch the first page. The query parameters are the same.
The pages field in the response will have the following sub-fields:
fromKey [String] The key of the first item in the array of items returned
nextKey [String] The key to use as the value of the pageFromKey query parameter when fetching the next page of data. This field won't present if there are no more pages to fetch.
size [Integer] Same as the pageSize query parameter passed in or its default value.
total [Integer] (Optional) the total number of pages that exist, if pageTotal=true was passed into the request.
maxSize [Integer]
All query parameters are optional. By default, if you don't specify a query parameter, the first page with up to 50 items on it is returned. The number of pages isn't returned.