Using Filters in REST 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.
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 the two types of filter.
Operation | Available in REST URL | Available in JSON String |
and or or operator | Yes | Yes |
Combined and and or filter | No | Yes |
IN conditions | No | Yes |
IS_NULL, IS_NOT_NULL, EQUAL, LIKE | Yes | Yes |
| Yes | No |