Paging lets you control the number of records returned by a request and page through the results. Check the documentation for each request type to see if it supports Paging.
To page results, use the .maxResults and .firstResult parameters. For example...
/webacs/api/v1/data/Devices?.full=true&.firstResult=0&.maxResults=4
would get the first four results (0-3). And...
/webacs/api/v1/data/Devices?.full=true&.maxResults=4&.firstResult=4
would get the next four results (4-7).
The response contains information about the full result set and the paging that was used:
<queryResponse last="7" first="4" count="24" type="Devices" rootUrl="https://my_server/webacs/api/v1/data" requestUrl="https://my_server/webacs/api/v1/data/Devices?.full=true&.maxResults=4&.firstResult=4" responseType="listEntityInstances"> ....
One can also use a HTTP header to control the paging. The Range header using a type of 'instances' can be added to a request instead of using the query parameters.
For example, this header would get the first 4 results:
Range:instances=0-3
The request/response for this would be:
> GET /webacs/api/v1/data/Devices HTTP/1.1 > User-Agent: curl/7.28.1 > Host: my_server > Accept: */* > Range:instances=0-3 > < HTTP/1.1 200 OK < Content-Type: text/xml < Content-Range: instances 0-3/14 < Content-Length: 607 < <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <queryResponse last="3" first="0" count="14" responseType="listEntityIds" requestUrl="https://my_server/webacs/api/v1/data/Devices" rootUrl="https://my_server/webacs/api/v1/data/Devices" type="Devices"> ....
Note: The url parameters .firstResult and .maxResults will override the header range value
When using either the query string or the HTTP header for paging, there is a limit of 1000 results per request. This limit can be configured.