OneData 10.7 | Managing Master Data with webMethods OneData | Developing for webMethods OneData | RESTful Web Services | Limiting Data Retrieved in RESTful GET Services | Using Filters in RESTful Services
 
Using Filters in RESTful Services
OneData provides multiple ways in which you can limit the data that is returned to the user by filtering on specific columns and records.
*Inline Filter. A RESTful web service link URL is encoded to avoid issues when the object name or interchange mapping name contains special characters that might break the HTTP request. Specify the filter conditions directly in the REST URL. This method can be used for simple conditions, to specify the object name and retrieve a specific record. You can also specify additional parameters, such as the batch size and sort order of columns.
*Advanced Filter. Specify a filter in the body of the REST request. The request type should be HTTP POST. With a JSON string, you can create complex queries with multiple operators and value filters. You cannot add REST parameters in the body of the service. These must be specified in the REST URL.
The following table compares the operations available in two types of filters.
Operation Group
Operation
Available as Inline Filter in REST URL
Available as Advanced Filter in JSON REST API
(in-memory enabled or disabled)
Relational Operators
=
Yes
Yes
!=, <, <=, >, >=
No
Yes
Logical Operators
LIKE
Yes (as col=value$)
Yes
NOT_LIKE, NOT LIKE
No
Yes
IN
No
Yes (in single and multiple columns)
NOT_IN, NOT IN
No
Yes (in single columns only)
IS_NULL, IS NULL, IS_NOT_NULL, IS NOT NULL , NOT_NULL, NOT NULL
Yes
Yes
EQUAL
No
Yes
REST URL Parameters
Such as those listed in REST URL Parameters.
Yes
Yes