Changes

Jump to: navigation, search

Odata Overview

171 bytes added, 14:11, 10 May 2018
Syntax of OData Queries
==Syntax of OData Queries==
1# Service Metadata Document - describes the data model exposed as HTTP endpoints by the service.  <pre>http://mysmartsimpleurl/OData/V4/pub/424623/Service.svc/$metadata</pre> # 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/424623/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/424623/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/424623/Service.svc/report_Neo_records?$orderby=first_name+asc
</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/424623/Service.svc/report_Neo_records?$top=2&$skip=3</pre>
5. # $count, used to determine how many rows in a collection
<pre> http://mysmartsimpleurl/OData/V4/pub/424623/Service.svc/report_Neo_records/$count</pre>
Smartstaff
1,385
edits

Navigation menu