OData Connector

From SmartWiki
Revision as of 14:31, 10 April 2017 by Ciaran Donnelly (talk | contribs)

Jump to: navigation, search

OData Connector

OData (Open Data Protocol) is an OASIS standard that defines a set of best practices for building and consuming RESTful APIs.

The OData Connector feature within Reports is intended help simplify data sharing across disparate applications in enterprise, Cloud, and mobile devices.

If is an available configurable option under the Reports Advanced tab.

When it is switched on the user is presented with a number of public and private links for OData versions 2, 3 and 4.

OData1.png


NOTE: Smartsimple provide OData V4 services, which can be consumed by OData clients like Excel, MSSQL server,Safeforce, or used as API. However, SmartSimple also supports version 2 and 3 as these tend to be the currently supported versions by most clients.


Syntax

1. Search syntax i.e. criteria on report using “???”: the URL below returns OData records with firstname equal ‘steve’ only

http://localhost/OData/V4/pub/113/Service.svc/report_Neo_records?$search=steve


2. Filter for dynamical search: the URL below returns OData records with firstname equal ‘steve’ only (eq stands for equal in OData protocol)

http://localhost/OData/V4/pub/113/Service.svc/report_Neo_records?$filter=first_name +eq+steve


3. Ordering: the URL below orders by first name

http://localhost/OData/V4/pub/113/Service.svc/report_Neo_records?$orderby=first_name+asc or http://localhost/OData/V4/pub/113/Service.svc/report_Neo_records?$orderby=first_name


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)

?$top=2&$skip=3