|
|
Line 1: |
Line 1: |
− | ==General==
| |
| | | |
− | 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 [[Edit Report Page: Advanced Settings Tab| 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.
| |
− |
| |
− | [[Image:OData1.png|border|700px]]
| |
− |
| |
− |
| |
− | ''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
| |
− |
| |
− | <pre>http://localhost/OData/V4/pub/113/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://localhost/OData/V4/pub/113/Service.svc/report_Neo_records?$filter=first_name +eq+steve </pre>
| |
− |
| |
− |
| |
− | 3. Ordering: the URL below orders by first name
| |
− | <pre>
| |
− | 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
| |
− | </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> ?$top=2&$skip=3</pre>
| |