Pagination is supported on services (not all yet), especially thoses used to get resources (eg GET / and find services).
Pagination is controlled by two parameters in the query string. If throse parameters are not specified, no pagination is done.
Request is runned each time. So if items ared added or removed between 2 calls, pagination can be altered.
|
Parameter |
Description |
Format |
Example |
|
pageSize |
Page size, that is maximum number of items returned by the service. This parameter is mandatory |
string |
25 |
|
pageNumber |
Page number, which is 1 based index. If omitted, default value is 1 |
string |
1 |
Example : http://myserver/api/RubriqueServices/?pageSize=25&pageNumber=3
In the response, standard headers are used to give informations about current pagination status
|
Header name |
Description |
Format |
Example |
|
Content-Range |
Pagination status with first index, last index, total count of items, with this form : "<first> - <last> | <total>" |
string |
20 - 30 | 388 |
|
Accept-Range |
Gives informations about pagination, with this form : "<resource> - <max>" |
string |
RubriqueInfo 388 |