webMethods, OneData, and Terracotta  10.2 | Managing Master Data with webMethods OneData | Developing for webMethods OneData | REST Web Services | Using Filters in REST Services
 
Using Filters in REST Services
 
REST Object URL Syntax
Using Filter Operators in a REST URL
OneData provides multiple ways in which you can limit the data that is returned to the user by filtering on specific columns and records.
*Use a RESTful web service URL. 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.
*JSON string. 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
Available as Inline Filter in REST URL
Available 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

Copyright © 2011-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release