Read a Resource

Searching a resource is achieved by sending a GET request to a resource URI. By default, the result would be the first page (page index = 0) with default size of 20. By adding filter, sorting and paging parameters to the URI, the client can control this search. The result is of type SearchResult. The resulting resources are in a collection of Base Resources that contains the name, ID, description, and link for each resource to its full representation to allow the client to easily drill in.
The following example shows a simple search for the internal user resource:

Adding Filter

Simple filtering should be available through the filter 'query string parameter'. The structure of a filter is a triplet of field operator and value separated with dots. More than one filter can be sent. The logical operator common to ALL filter criteria will be by default AND, and can be changed by using the "filtertype=or" query string parameter. Each resource data model description should specify if an attribute is a filtered field. 

Example: get internal users with first name starting with 'a' belonging to identity group 'Finance'

GET /ers/config/internaluser?filter=name.STARTW.a&filter=identityGroup.EQ.Finance

The following table describes the available filter operators:

OperatorDescription
EQ Equals
NEQ Not Equals
GT Greater Than
LT Less Than
STARTSW Starts With
NSTARTSW Not Starts With
ENDSW Ends With
NENDSW Not Ends With
CONTAINS Contains
NCONTAINS Not Contains

Paging

The search result is by default paged to 20 resources per page. Page numbering starts at page '1'. Maximum resources per page cannot be more than 100 resources. The paging parameters can override the defaults by using the paging parameters as described in example below. In this example the page size is changed to 50 resources:

GET /ers/config/internaluser?filter=name.STARTW.a&filter=identityGroup.EQ.Finance&?size=50&page=1

Sorting

By default, the sort column is 'name' and sort direction is 'ascendingnot'. Overriding the defaults is done by using the 'sortasc' (ascending order) or 'sortdsc' (descending order) as described in the example below:

GET /ers/config/internaluser?filter=name.STARTW.a&filter=identityGroup.EQ.Finance&?size=50&page=1&sortdsc=name