Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Open Data Protocol
Open protocol which allows the creation and consumption of queryable and interoperable RESTful APIs in a simple and standard way

In computing, Open Data Protocol (OData) is an open protocol that allows the creation and consumption of queryable and interoperable Web service APIs in a standard way. Microsoft initiated OData in 2007. Versions 1.0, 2.0, and 3.0 are released under the Microsoft Open Specification Promise. Version 4.0 was standardized at OASIS, with a release in March 2014. In April 2015 OASIS submitted OData v4 and OData JSON Format v4 to ISO/IEC JTC 1 for approval as an international standard. In December 2016, ISO/IEC published OData 4.0 Core as ISO/IEC 20802-1:2016 and the OData JSON Format as ISO/IEC 20802-2:2016.

The protocol enables the creation and consumption of HTTP-based Web APIs, which allow Web clients to publish and edit resources, identified using URLs and defined in a data model, using simple HTTP messages. OData shares some similarities with JDBC and with ODBC; like ODBC, OData is not limited to relational databases.

We don't have any images related to Open Data Protocol yet.
We don't have any YouTube videos related to Open Data Protocol yet.
We don't have any PDF documents related to Open Data Protocol yet.
We don't have any Books related to Open Data Protocol yet.
We don't have any archived web articles related to Open Data Protocol yet.

Standardization

After initial development by Microsoft, OData became a standardized protocol of the OASIS OData Technical Committee (TC).

OASIS OData Technical Committee

"The OASIS OData TC works to simplify the querying and sharing of data across disparate applications and multiple stakeholders for re-use in the enterprise, Cloud, and mobile devices. A REST-based protocol, OData builds on HTTP, AtomPub, and JSON using URIs to address and access data feed resources. It enables information to be accessed from a variety of sources including (but not limited to) relational databases, file systems, content management systems, and traditional Web sites. OData provides a way to break down data silos and increase the shared value of data by creating an ecosystem in which data consumers can interoperate with data producers in a way that is far more powerful than currently possible, enabling more applications to make sense of a broader set of data. Every producer and consumer of data that participates in this ecosystem increases its overall value."8

TC participants include CA Technologies, Citrix Systems, IBM, Microsoft, Progress Software, Red Hat, SAP SE and SDL.

Architecture

OData is a protocol for the creation and consumption of Web APIs. OData thus builds on HTTP, AtomPub, and JSON using URIs to address and access data feed resources.

Resource identification

OData uses URIs to identify resources. For every OData service whose service root is abbreviated as http://host/service/, the following fixed resources can be found:

The service document

The service document lists entity sets, functions, and singletons that can be retrieved. Clients can use the service document to navigate the model in a hypermedia-driven fashion.

The service document is available at http://host/service/

The metadata document

The metadata document describes the types, sets, functions and actions understood by the OData service. Clients can use the metadata document to understand how to query and interact with entities in the service.

The metadata document is available at http://host/service/$metadata.

Dynamic resources

The URIs for the dynamic resources may be computed from the hypermedia information in the service document and metadata document

Resource operation

OData uses the HTTP verbs to indicate the operations on the resources.

  • GET: Get the resource (a collection of entities, a single entity, a structural property, a navigation property, a stream, etc.).
  • POST: Create a new resource.
  • PUT: Update an existing resource by replacing it with a complete instance.
  • PATCH: Update an existing resource by replacing part of its properties with a partial instance.
  • DELETE: Remove the resource.

Querying

URLs requested from an OData endpoint may include query options. The OData protocol specifies various 'system query options' endpoints should accept, these can be used to filter, order, map or paginate data.

Query options can be appended to a URL after a ? character and are separated by & characters; each option consists of a $-sign prefixed name and its value, separated by a = sign, for example: OData/Products?$top=2&$orderby=Name. A number of logical operators and functions are defined for use when filtering data, for example: OData/Products?$filter=Price lt 10.00 and startswith(Name,'M') requests products with a price smaller than 10 and a name starting with the letter 'M'.

Resource representation

OData uses different formats for representing data and the data model. In OData protocol version 4.0, JSON format is the standard for representing data, with the Atom format still being in committee specification stage. For representing the data model, the Common Schema Definition Language (CSDL) is used, which defines an XML representation of the entity data model exposed by OData services.

A sample OData JSON data payload

A collection of products:

{ "@odata.context": "http://services.odata.org/V4/OData/OData.svc/$metadata#Products", "value": [ { "ID": 0, "Name": "Meat", "Description": "Red Meat", "ReleaseDate": "1992-01-01T00:00:00Z", "DiscontinuedDate": null, "Rating": 14, "Price": 2.5 }, { "ID": 1, "Name": "Milk", "Description": "Low fat milk", "ReleaseDate": "1995-10-01T00:00:00Z", "DiscontinuedDate": null, "Rating": 3, "Price": 3.5 }, ... ] }

A sample OData Atom data payload

A collection of products:

<feed xml:base="http://services.odata.org/V4/OData/OData.svc/" m:context="http://services.odata.org/V4/OData/OData.svc/$metadata#Products" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"> <id>http://services.odata.org/v4/odata/odata.svc/Products</id> <title type="text">Products</title> <updated>2015-05-19T03:38:50Z</updated> <link rel="self" title="Products" href="Products"/> <entry> <id>http://services.odata.org/V4/OData/OData.svc/Products(0)</id> <category term="#ODataDemo.Product" scheme="http://docs.oasis-open.org/odata/ns/scheme"/> <link rel="edit" title="Product" href="Products(0)"/> <link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Categories" type="application/xml" title="Categories" href="Products(0)/Categories/$ref"/> <link rel="http://docs.oasis-open.org/odata/ns/related/Categories" type="application/atom+xml;type=feed" title="Categories" href="Products(0)/Categories"/> <link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Supplier" type="application/xml" title="Supplier" href="Products(0)/Supplier/$ref"/> <link rel="http://docs.oasis-open.org/odata/ns/related/Supplier" type="application/atom+xml;type=entry" title="Supplier" href="Products(0)/Supplier"/> <link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/ProductDetail" type="application/xml" title="ProductDetail" href="Products(0)/ProductDetail/$ref"/> <link rel="http://docs.oasis-open.org/odata/ns/related/ProductDetail" type="application/atom+xml;type=entry" title="ProductDetail" href="Products(0)/ProductDetail"/> <title/> <updated>2015-05-19T03:38:50Z</updated> <author> <name/> </author> <content type="application/xml"> <m:properties> <d:ID m:type="Int32">0</d:ID> <d:Name>Bread</d:Name> <d:Description>Whole grain bread</d:Description> <d:ReleaseDate m:type="DateTimeOffset">1992-01-01T00:00:00Z</d:ReleaseDate> <d:DiscontinuedDate m:null="true"/> <d:Rating m:type="Int16">4</d:Rating> <d:Price m:type="Double">2.5</d:Price> </m:properties> </content> </entry> <entry> <id>http://services.odata.org/V4/OData/OData.svc/Products(1)</id> <category term="#ODataDemo.Product" scheme="http://docs.oasis-open.org/odata/ns/scheme"/> <link rel="edit" title="Product" href="Products(1)"/> <link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Categories" type="application/xml" title="Categories" href="Products(1)/Categories/$ref"/> <link rel="http://docs.oasis-open.org/odata/ns/related/Categories" type="application/atom+xml;type=feed" title="Categories" href="Products(1)/Categories"/> <link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/Supplier" type="application/xml" title="Supplier" href="Products(1)/Supplier/$ref"/> <link rel="http://docs.oasis-open.org/odata/ns/related/Supplier" type="application/atom+xml;type=entry" title="Supplier" href="Products(1)/Supplier"/> <link rel="http://docs.oasis-open.org/odata/ns/relatedlinks/ProductDetail" type="application/xml" title="ProductDetail" href="Products(1)/ProductDetail/$ref"/> <link rel="http://docs.oasis-open.org/odata/ns/related/ProductDetail" type="application/atom+xml;type=entry" title="ProductDetail" href="Products(1)/ProductDetail"/> <title/> <updated>2015-05-19T03:38:50Z</updated> <author> <name/> </author> <content type="application/xml"> <m:properties> <d:ID m:type="Int32">1</d:ID> <d:Name>Milk</d:Name> <d:Description>Low fat milk</d:Description> <d:ReleaseDate m:type="DateTimeOffset">1995-10-01T00:00:00Z</d:ReleaseDate> <d:DiscontinuedDate m:null="true"/> <d:Rating m:type="Int16">3</d:Rating> <d:Price m:type="Double">3.5</d:Price> </m:properties> </content> </entry> ... </feed>

A sample OData metadata document

<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"> <edmx:DataServices> <Schema Namespace="ODataDemo" xmlns="http://docs.oasis-open.org/odata/ns/edm"> <EntityType Name="Product"> <Key> <PropertyRef Name="ID"/> </Key> <Property Name="ID" Type="Edm.Int32" Nullable="false"/> <Property Name="Name" Type="Edm.String"/> <Property Name="Description" Type="Edm.String"/> <Property Name="ReleaseDate" Type="Edm.DateTimeOffset" Nullable="false"/> <Property Name="DiscontinuedDate" Type="Edm.DateTimeOffset"/> <Property Name="Rating" Type="Edm.Int16" Nullable="false"/> <Property Name="Price" Type="Edm.Double" Nullable="false"/> </EntityType> <ComplexType Name="Address"> <Property Name="Street" Type="Edm.String"/> <Property Name="City" Type="Edm.String"/> <Property Name="State" Type="Edm.String"/> <Property Name="ZipCode" Type="Edm.String"/> <Property Name="Country" Type="Edm.String"/> </ComplexType> <EntityContainer Name="DemoService"> <EntitySet Name="Products" EntityType="ODataDemo.Product"></EntitySet> </EntityContainer> </Schema> </edmx:DataServices> </edmx:Edmx>

Ecosystem

The ecosystem of OData consists of the client/server libraries that implement the protocol, and applications that are based on the protocol.

Libraries

There are a number of OData libraries available to access/produce OData APIs:

.NET

  • Server and client: Microsoft's OData .NET libraries9
  • Client: Simple.OData.Client10

Java

  • Server and client: Apache Olingo11
  • Server side: Jello-Framework12
  • Client: odata-client13

JavaScript

  • Client: Apache Olingo14 (featured by OASIS15)
  • Client: data.js16
  • Client: JayData17 for higher level of abstraction (LINQ-like syntax, support for OData geo features, IndexedDB, WebSQL, integration for DevExtreme, Kendo UI, Angular.js, Knockout.js and Sencha).
  • Client: OpenUI5 library maintained by SAP
  • Client (Node.js): JayData for node18
  • Client: Breeze19
  • Client: OData4 and Invantive Bridge Online20
  • Client: odata-fluent-query:21 a JavaScript OData query language parser
  • Server: node-odata22

PHP

  • Client: odataphp23
  • Server: POData24

Python

  • Client: PyOData25
  • Server and client: Pyslet26

Ruby

  • Client: ruby_odata library27
  • Client: Free OData V4.0 Library for Ruby28
  • Server: Safrano29

Others

Other languages implemented include:30

  • AJAX: ASP.NET Ajax Library31 for getting to OData.
  • C++: odatacpp_client32 is a client-side-only implementation of the OData protocol.
  • Windward Studios33 supports OData in their Reporting & Document Generation Solutions.
  • Reporting tool List & Label has a specialized data provider for OData.
  • Blackberry (C++): OData-BB1034 Open Data Protocol (OData) library for BlackBerry 10 (BB10) Cascades apps

Applications

Applications include:35

Tools

  • Nucleon Database Master 50

See also

OData OASIS Standards

Committee Specifications

Committee Notes

References

  1. Flasko, Mike (18 July 2007). "Welcome!". MSDN Blogs. OData Team. Archived from the original on May 5, 2014. https://web.archive.org/web/20140505051809/http://blogs.msdn.com/b/odatateam/archive/2007/07/18/welcome.aspx

  2. "OASIS Open Data Protocol (OData) Technical Committee". Retrieved 2013-08-05. https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata

  3. "OASIS Approves OData 4.0 Standards for an Open, Programmable Web". oasis-open.org. 17 March 2014. https://www.oasis-open.org/news/pr/oasis-approves-odata-4-0-standards-for-an-open-programmable-web

  4. "OASIS has Submitted OData v4 and OData JSON Format v4 to ISO/IEC JTC 1 for approval as an International Standard". MS Open Tech. Archived from the original on 2015-05-20. Retrieved 2015-05-18. https://web.archive.org/web/20150520091929/https://msopentech.com/blog/2015/04/21/oasis-has-submitted-odata-v4-and-odata-json-format-v4-to-isoiec-jtc-1-for-approval-as-an-international-standard/

  5. "OData Published as an ISO Standard · OData - the Best Way to REST". www.odata.org. Retrieved 2021-05-11. https://www.odata.org/blog/OData-Published-as-an-ISO-Standard/

  6. "ISO/IEC 20802-1:2016". ISO. Retrieved 2021-05-11. https://www.iso.org/cms/render/live/en/sites/isoorg/contents/data/standard/06/92/69208.html

  7. "ISO/IEC 20802-2:2016". ISO. Retrieved 2021-05-11. https://www.iso.org/cms/render/live/en/sites/isoorg/contents/data/standard/06/92/69209.html

  8. "OASIS Open Data Protocol (OData) TC | OASIS". www.oasis-open.org. Retrieved September 24, 2019. https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata

  9. Microsoft's OData .NET libraries https://odata.github.io/

  10. Simple.OData.Client https://github.com/object/Simple.OData.Client

  11. Apache Olingo https://olingo.apache.org/

  12. Jello-Framework http://jello-framework.com/guide/rest.html

  13. odata-client https://github.com/davidmoten/odata-client

  14. Apache Olingo https://olingo.apache.org/

  15. "Libraries · OData - the Best Way to REST". www.odata.org. Retrieved 2019-02-19. https://www.odata.org/libraries/

  16. "data.js". CodePlex Archive. https://archive.codeplex.com/?p=datajs

  17. JayData http://jaydata.org/

  18. JayData for node https://npmjs.org/package/jaydata

  19. Breeze http://www.getbreezenow.com/

  20. OData4 and Invantive Bridge Online https://access-odata.com

  21. odata-fluent-query https://github.com/rosostolato/odata-fluent-query

  22. node-odata https://github.com/TossShinHwa/node-odata

  23. odataphp http://odataphp.codeplex.com/

  24. POData https://github.com/Algo-Web/POData

  25. PyOData https://github.com/SAP/python-pyodata

  26. Pyslet https://pypi.python.org/pypi/pyslet

  27. ruby_odata library http://rdoc.info/github/visoft/ruby_odata

  28. Free OData V4.0 Library for Ruby https://github.com/wrstudios/frodata

  29. Safrano https://safrano.aithscel.eu

  30. "Libraries". odata.org. http://www.odata.org/libraries/

  31. ASP.NET Ajax Library http://ajax.codeplex.com/

  32. odatacpp_client https://github.com/OData/odatacpp-client

  33. Windward Studios https://www.windwardstudios.com/datasource/odata

  34. OData-BB10 https://github.com/blackberry/OData-BB10

  35. "Ecosystem". odata.org. http://www.odata.org/ecosystem/

  36. Progress DataDirect Hybrid Data Pipeline https://www.progress.com/cloud-and-hybrid-data-integration

  37. "SAP NetWeaver Gateway". Retrieved 2012-11-22. http://scn.sap.com/community/netweaver-gateway

  38. IBM developerWorks eXtreme Scale REST data service (OData) http://www.ibm.com/developerworks/websphere/downloads/xs_rest_service.html

  39. "Welcome to Office 365 APIs". docs.microsoft.com. 28 August 2018. Retrieved September 24, 2019. https://docs.microsoft.com/en-us/previous-versions/office/office-365-api/

  40. "Set Up Salesforce Connect to Access External Data with the OData 2.0 or 4.0 Adapter". https://help.salesforce.com/s/articleView?id=sf.platform_connect_setup.htm&type=5

  41. Skyvia Connect http://skyvia.com/connect/

  42. "OData - Tableau". help.tableau.com. Retrieved September 24, 2019. https://help.tableau.com/current/pro/desktop/en-us/examples_odata.htm

  43. "OData and Spotfire". The TIBCO Blog. Retrieved 2016-03-30. https://www.tibco.com/blog/2015/05/28/odata-and-spotfire/

  44. Mulesoft https://www.mulesoft.com/

  45. "Anypoint Exchange". www.mulesoft.com. Retrieved September 24, 2019. https://www.mulesoft.com/exchange/

  46. SuccessFactors https://www.successfactors.com/

  47. Ceridian HCM's Dayforce https://www.ceridian.com/

  48. "HR Reporting Software - Dayforce | Ceridian". www.ceridian.com. Retrieved September 24, 2019. https://www.ceridian.com/products/dayforce/hr/reporting

  49. "What You Need to Know About Redfish API". Exxact. 2017-12-01. Retrieved 2019-08-31. https://www.exxactcorp.com/blog/HPC/what-you-need-to-know-about-redfish-api

  50. "Nucleon Database Master". Retrieved 16 November 2017. http://mongodb-tools.com/tool/nucleon-database-master/