Pagination

Client Side Pagination

Requests that return multiple items will be paginated to 10 items by default. You can specify further pages with the page parameter. For resources, you can also set a custom page size up to 100 with the pageSize parameter.

Get 2 agreements/ Example GET /agreements?page=1&pagesize=2

curl -k -i -H "Content-Type: application/json"\ 
-H "X-Token: {api-token}"\
-X GET 'https://{host-name}/agreements?select=id,name & page=1 & pageSize=2'

Sample Response

Note that page numbering is 1-based and that omitting the ?page parameter will return the first page.

Server Side Pagination

count and CountOnly Query Parameters

It is computationally expensive on server to include total row count on every request. Also client may not need the total row count on every request. Some client like mobile app may not at all need total row count since they can use hasMoreData flag to scroll.

By default for each request server always set the value of TotalRowCount and TotalNumberOfPages to "-1".

-1 Indicates the client that server have not calculated the total row count.

count - If user sets this parameter true in the request , response will include data as well as TotalRowCount and TotalNumberOfPages set with proper value in pagingdata in the response envelope.

Sample response -

GET /agreements?select=id,name & page=1 & pageSize=2 &count=true

countOnly - If user sets this parameter true in the request , response will include TotalRowCount and TotalNumberOfPages set with proper value in the response envelope. This will not bring any data in response.

Usage - Sometime we just want to know the count of resources rather than the data itself to display it in the UI or APP.

Sample response -

GET /agreements?countOnly=true