Manage Collections

A collection resource represents a list of items. The only root collection resource currently used in the Data Export API is for the collection of export statuses. The full query and filter support for collections is not yet available for this API.

However, there is some support for simple "paging" through the list of statuses for export requests in the database. This is achieved by using the "limit" and "offset" query parameters.

Paginating

Most resource collections need some kind of pagination. Without it, a simple search could return millions of records, putting excessive workload on the server for potentially no reason. So, instead of receiving all the records of a collection resource, you can limit the number of records that are displayed on a page in the REST client response. To do so, set the following query parameters in the request URI:

  • limit: to specify the paging size. There is a maximum value of 1000 which is a system limit and cannot be configured.

  • offset: to specify the starting point from which the resources are returned.

Example Response Body

{
  "count": 25,
  "items": [
   .
   .
   .
  ]
}

When you specify the limit and offset parameters, the paginated result is ordered by request ID. If you create new export requests between paging requests, the records displayed in each page may vary.

Example Requests Records Returned
GET /exportStatuses?offset=10&limit=20 11 through 30
GET /exportStatuses?limit=10 1 through 10
GET / exportStatuses?offset=25 26 through 50

If not specified, the "limit" parameter defaults to the system default which is configurable. The initial value is 25 but can be changed by setting the following property to a different value:

glog.fusion.cil.restapi.config.limit=50

This would return up to 50 matching items if no 'limit' parameter is used. It is also possible to set a maximum value for the limit parameter that any client can use. There is also a system wide maximum value that cannot be exceeded and is not configurable. If a query exceeds this value it is not possible to access the skipped records without narrowing the search criteria.

The maximum value for the limit query parameter is controlled by the following example property:

glog.fusion.cil.restapi.config.max_limit=500

Therefore, if a client specified "limit=600" in their request, the lower value of 500 would be used. The hard system limit is currently set at 1000.

Sorting

The sorting of export statuses is currently forced to be by request ID.