Changes

Jump to: navigation, search

Odata Overview

15 bytes added, 18:40, 7 May 2018
Syntax of OData Queries
1. Search syntax i.e. criteria on report using “???”: the URL below returns OData records with firstname equal ‘steve’ only
<pre>http://mysmartsimpleurl/OData/V4/pub/113424623/Service.svc/report_Neo_records?$search=steve</pre>
2. Filter for dynamical search: the URL below returns OData records with firstname equal ‘steve’ only (eq stands for equal in OData protocol)
<pre>http://mysmartsimpleurl/OData/V4/pub/113424623/Service.svc/report_Neo_records?$filter=first_name +eq+steve </pre>
3. Ordering: the URL below orders by first name
<pre>http://mysmartsimpleurl/OData/V4/pub/113424623/Service.svc/report_Neo_records?$orderby=first_name+asc
or
http://mysmartsimpleurl/OData/V4/pub/113424623/Service.svc/report_Neo_records?$orderby=first_name
</pre>
4. $top and $skip, used mainly for pagination: The syntax below skips 3 records and return 2 records only (i.e. only 4th and 5th will return)
<pre> http://mysmartsimpleurl/OData/V4/pub/113424623/Service.svc/report_Neo_records?$top=2&$skip=3</pre>
==Troubleshooting==
Smartstaff
1,385
edits

Navigation menu