In computing, Open Data Protocol (OData) is an open protocol that allows the creation and consumption of queryable and interoperable REST APIs in a simple and 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
In ecology, an oasis (; ) is a fertile area of a desert or semi-desert environment'ksar''with its surrounding feeding source, the palm grove, within a relational and circulatory nomadic system.”
The location of oases has been of critical imp ...
, with a release in March 2014. In April 2015 OASIS submitted OData v4 and OData JSON Format v4 to
ISO/IEC JTC 1
ISO/IEC JTC 1, entitled "Information technology", is a joint technical committee (JTC) of the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC). Its purpose is to develop, maintain and pr ...
for approval as an
international standard
international standard is a technical standard developed by one or more international standards organizations. International standards are available for consideration and use worldwide. The most prominent such organization is the International Or ...
. 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 REST 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
In computing, Open Database Connectivity (ODBC) is a standard application programming interface (API) for accessing database management systems (DBMS). The designers of ODBC aimed to make it independent of database systems and operating systems. An ...
; like ODBC, OData is not limited to
relational database
A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relatio ...
s.
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
JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other ser ...
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."
Citrix Systems
Citrix Systems, Inc. is an American multinational cloud computing and virtualization technology company that provides server, application and desktop virtualization, networking, software as a service (SaaS), and cloud computing technologies. C ...
Red Hat
Red Hat, Inc. is an American software company that provides open source software products to enterprises. Founded in 1993, Red Hat has its corporate headquarters in Raleigh, North Carolina, with other offices worldwide.
Red Hat has become ass ...
OData is a protocol for the creation and consumption of RESTful APIs. Thus, as common practices of REST, OData 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
Hypermedia, an extension of the term hypertext, is a nonlinear medium of information that includes graphics, audio, video, plain text and hyperlinks. This designation contrasts with the broader term ''multimedia'', which may include non-interac ...
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:
A sample OData Atom data payload
A collection of products:
http://services.odata.org/v4/odata/odata.svc/ProductsProducts2015-05-19T03:38:50Zhttp://services.odata.org/V4/OData/OData.svc/Products(0)2015-05-19T03:38:50Z0BreadWhole grain bread1992-01-01T00:00:00Z42.5http://services.odata.org/V4/OData/OData.svc/Products(1)2015-05-19T03:38:50Z1MilkLow fat milk1995-10-01T00:00:00Z33.5
...
A sample OData metadata document
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 libraries
* Client: Simple.OData.Client
Java
* Server and client: Apache Olingo
* Server side: Jello-Framework
* Client: odata-client
JavaScript
* Client: Apache Olingo (featured by
OASIS
In ecology, an oasis (; ) is a fertile area of a desert or semi-desert environment'ksar''with its surrounding feeding source, the palm grove, within a relational and circulatory nomadic system.”
The location of oases has been of critical imp ...
)
* Client: data.js
* Client: JayData 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 node
* Client: Breeze
* Client: OData4 and Invantive Bridge Online
* Client: odata-fluent-query: a JavaScript OData query language parser
* Server: node-odata
Other languages implemented include:
* AJAX: ASP.NET Ajax Library for getting to OData.
* C++: odatacpp_client is a client-side-only implementation of the OData protocol.
* Windward Studios supports OData in their Reporting & Document Generation Solutions.
* Reporting tool List & Label has a specialized data provider for OData.
* Blackberry (C++): OData-BB10 Open Data Protocol (OData) library for BlackBerry 10 (BB10) Cascades apps
Applications
Applications include:
* Progress DataDirect Hybrid Data Pipeline can expose any cloud,
big data
Though used sometimes loosely partly because of a lack of formal definition, the interpretation that seems to best describe Big data is the one associated with large body of information that we could not comprehend when used only in smaller am ...
or relational data sources as OData end points
* Socrata exposes an OData API.
*
Microsoft Azure
Microsoft Azure, often referred to as Azure ( , ), is a cloud computing platform operated by Microsoft for application management via around the world-distributed data centers. Microsoft Azure has multiple capabilities such as software as a ...
exposes an OData API.
Oracle Analytics Cloud can connect to an OData API
* SAP NetWeaver Gateway provides OData access to SAP Business Suite and SAP Business Warehouse.
* IBM WebSphere eXtreme Scale REST data service can be accessed by any HTTP client using OData.IBM developerWorks eXtreme Scale REST data service (OData)
* Microsoft SharePoint 2010 and up can expose its data as OData endpoint
* Office 365 exposes OData V4.0 APIs.
* Salesforce Connect consumes OData APIs.
* Skyvia Connect exposes cloud and database data via OData
* Tableau can connect to OData APIs.
* TIBCO Spotfire can connect to OData APIs.
* Mulesoft helps integrate with OData APIs.
* SuccessFactors uses Odata APIs
* Ceridian HCM's Dayforce uses Odata
* Redfish uses Odata
Tools
* Nucleon Database Master
See also
*
GData Gdata may refer to:
* GData, the Google
Google LLC () is an American multinational technology company focusing on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial ...
– competing protocol from Google
*
Resource Description Framework The Resource Description Framework (RDF) is a World Wide Web Consortium (W3C) standard originally designed as a data model for metadata. It has come to be used as a general method for description and exchange of graph data. RDF provides a variety of ...