To use a specific filter configuration for a request, you can provide the filter
identifier as URL query parameter. The filter identifier must be configured in the
custom/rest/searchfilter.json file. The REST Service uses the corresponding
filter configuration to create the filter expression. The filter identifier is useful when a REST
endpoint is started for different REST functions.
About this task
By default, the REST search service returns all the data for an entity. To get a specific search
result, you must customize the search operation by defining the filter identifier for the REST
search service. Complete the following steps.
Procedure
- From the top-level menu of the Appliance
Dashboard, select .
- On the Custom File Management
page, click the All Files tab.
- Go to directories/data.
- Select the rest.properties file to
work with it.
- From the top-level menu of the Appliance
Dashboard, select .
- On the Update Property page, click
the All Properties tab.
- Click the Identity server property
files tab.
- Select the rest.properties file
and define the filter identifier text for the REST service endpoint key.
- Add the filter identifier details in the
searchfilter.json file.
For example, if you define the filter identifier in the
rest.properties as
customsearch
, then you can add the details
in the
searchfilter.json
file.
"customsearch": {
"filterTemplate": "(&(requester=${requester})(${filterExpression}))",
"joinOperator": "&",
"multivalueJoinOperator": "|",
"comparisonOperator": ">=",
"baseFilter": "(!(uid=${systemUser.owner.uid}))",
"allowWildcard": "false"
Results
The filter identifier is defined according to your requirement. Use the filter identifier
customsearch
as a URL parameter for the REST search service.