How do I filter ODATA results?

How do I filter ODATA results?

book

Article ID: KB0082917

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 7.0.0 and higher

Description

This article discusses how to filter ODATA results.

Issue/Introduction

How do I filter ODATA results?

Additional Information

To filter the data, you need append  ?$filter=<filter condition> to the URL.
Below are two examples.

http://172.23.6.85:9400/odata/examples/customers?$filter=customerid eq 1
http://172.23.6.85:9400/odata/examples/customers?$filter=contactlastname eq 'Born'
 
If you want the data to be returned in JSON format, append $format=JSON to the URL.
Below are two examples of getting results in JSON format.

http://172.23.6.85:9400/odata/examples/customers/?$format=JSON
http://172.23.6.85:9400/odata/examples/customers/?$format=JSON&?$filter=contactlastname eq 'Born'