Post on 22-Jan-2018
OData - The Universal
REST API
Nishanth Kadiyala
Product Marketing Manager
Progress DataDirect
@nish_kadi
https://www.linkedin.com/in/nishanthkadiyala/
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.2
Agenda
Background : API Landscape
Basics of OData
Who is part of this ecosystem?
How to produce OData?
Evolution and Limitations
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.3
Let’s do a quick poll….
How many different REST APIs does your organization consume
today?
• 0-5
• 6-10
• 11-15
• >15
How many of you have heard about OData before this session?
How many of you use OData today?
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.4
Observed Trends
Impacts government, science and enterprise
Data Silos -> Open Data
APIs need to support both on-premises and cloud
On Premises -> Cloud
Mobile, Tablet, Laptop
Desktops -> BYOD
RESTful programming patterns
SOAP APIs -> Resource-oriented APIs
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.5
There are over 17000 APIs and 40 new APIs are added everyday.
Data Source API
Eloqua Web Services API (REST/SOAP)
Bulk and non-Bulk APIs
No query language
Oracle Service Cloud Web Services APIs (REST/SOAP)
ROQL
Google Analytics Hypercube (query limits of 10 metrics grouped by
max of 7 dimensions)
Salesforce SOAP, BULK, Metadata API, REST,
SOQL
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.6
REST is great, but….
…..OData is the solution
• It is a style, not a standard. So, each REST API is different
• Limited and different querying capabilities
• CRUD operations are often implemented differently
• Metadata is not always exposed via the URL
• Harder for developers to adopt and maintain a new API
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.7
An open protocol to allow the creation and consumption of
queryable and interoperable RESTful APIs in a simple and standard way
What is OData?
Progress was first member of OData Technical Committee following Microsoft
Started by Microsoft in
2007
OASIS Standard since
Feb 2014
Ratified as an ISO standard in
Feb 2017
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.8
OData is essentially SQL for the web built on top of standard protocols – HTTP,
JSON & ATOM – while leveraging the REST architecture style
OData is the standard for REST
ODATA
ODATA- The standard REST API
HTTP
XML Atom publishing JSON
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.9
Why are organizations adopting OData?
Operations built on REST principles
Uniform URL Conventions
Consumer oriented conceptual resource model
Easy access to Metadata
Interoperability across multiple applications
If you know SQL, OData is easy to learn/adopt
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.10
Background : API Landscape
Basics of OData
Who is part of this ecosystem?
How to produce OData?
Evolution and Limitations
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.11
Defined Conventions
• Resource retrieval, Query, Insert,
Update, Delete, Custom
Functions/Actions
• Batch Requests
• Delta Requests
• Metadata Description
• Relationship Navigation
• Filter, Sort, Top/Skip, Expand, Projection,
Aggregation
COMMON REQUESTS URL QUERY CONVENTIONS
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.12
URL Query Conventions
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.13
Resource URL
BankingDetails https://service.datadirectcloud.com/api/odata/SQLServerOnPrem/BankingTables?$format=JSON
$Select=x,y https://service.datadirectcloud.com/api/odata/SQLServerOnPrem/BankingTables?$select=AcctNumber,AcctState
$Filter https://service.datadirectcloud.com/api/odata/SQLServerOnPrem/BankingTables?$filter=AcctState eq 'TU‘ (similarly ne,gt,lt)
AND https://service.datadirectcloud.com/api/odata/SQLServerOnPrem/BankingTables?$select=AcctNumber,AcctState&$top=5
Orderby https://service.datadirectcloud.com/api/odata/SQLServerOnPrem/BankingTables?$orderby=AcctBranch asc, AcctState desc
URL Query Conventions
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.14
Background : API Landscape
Basics of OData
Who is part of this ecosystem?
How to produce OData?
Evolution and Limitations
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.15
Broad Adoption for OData
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.16
Here are some of the scenarios where enterprises are adopting OData:
External objects
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.17
Our 4th Annual data access outlook survey shows that OData is growing strong
486
108
16
249
78
61
0
100
200
300
400
500
600
700
800
REST OData GraphQL
API Landscape
Currently Use Plan to use in the next 2 years
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.18
Background : API Landscape
Basics of OData
Who is part of this ecosystem?
How to produce OData?
Evolution and Limitations
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.19
OData Libraries - http://www.odata.org/libraries/
.NET Java JavaScript Other
RESTier Apache Olingo Node-odata ODataCpp (C++)
ODataLib SDL OData Frameworks DevExtreme Pyslet Python Package
Edmlib Odata4j o.js ODataStore for CoreData (iOS)
ASP.NET Web API OData Jello Framework OpenUI5 OData4ObjC (iOS)
AdaptiveLINQ ODataJClient JayData OData Client Library for Tcl/Tk
Microsoft.Spatial Breeze.js
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.20
Or You can use DataDirect Cloud to produce OData
Why DataDirect Cloud?
• OData from any data
source
• No Coding
• No version control
needed
• Patented on-premises
gateway technology
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.21
DEMO
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.22
Background : API Landscape
Basics of OData
Who is part of this ecosystem?
How to produce OData?
Evolution and Limitations
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.23
OData specification is continuously evolving…
•Limitations
• It is not great for Bulk Data Transfer yet
• OData 2.0 doesn’t support aggregation, Filter expansion, etc.
• OData 4.0 queries are not all compatible with 2.0
•Evolution
• 4.01 adds Aggregation/Group By
• JSON has been made the default format
• Supports Dynamic Metadata Schema
• Support for Filter Expansion (You can now ask for a customer and his details alone)
• Asynchronous support for long-running requests
• Many more new features…
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.24
Resources:
1. Understanding OData in 6 steps
2. What is OData? Quick Guide
3. Salesforce External Objects, Salesforce Connect and OData
4. Firewall-Friendly On-Premises Data Access
5. Webinar on SaaS OData External Data Integration Strategy
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.26
APPENDIX
© 2016 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.27
OData for Analytics in data visualization (consumers)
• Tableau
• Tibco Spotfire
• Microsoft PowerBI
• IBM Cognos
• SAP Lumira