computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
, Open Data Protocol (OData) is an open protocol that allows the creation and consumption of queryable and interoperable
Web service
A web service (WS) is either:
* a service offered by an electronic device to another electronic device, communicating with each other via the Internet, or
* a server running on a computer device, listening for requests at a particular port over a n ...
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
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 (; : oases ) is a fertile area of a desert or semi-desert environmentISO/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 an ...
for approval as an
international standard
An 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 O ...
. 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 API
A web API is an application programming interface (API) for either a web server or a web browser.
As a web development concept, it can be related to a web application's client side (including any web frameworks being used).
A server-side web AP ...
s, which allow Web clients to publish and edit resources, identified using URLs and defined in a
data model
A data model is an abstract model that organizes elements of data and standardizes how they relate to one another and to the properties of real-world entities. For instance, a data model may specify that the data element representing a car be ...
, using simple HTTP messages. OData shares some similarities with
JDBC
Java Database Connectivity (JDBC) is an application programming interface (API) for the Java (programming language), Java programming language which defines how a client may access a database. It is a Java-based data access technology used for Java ...
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 (RDB) is a database based on the relational model of data, as proposed by E. F. Codd in 1970.
A Relational Database Management System (RDBMS) is a type of database management system that stores data in a structured for ...
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
HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, wher ...
JSON
JSON (JavaScript Object Notation, pronounced or ) is an open standard file format and electronic data interchange, data interchange format that uses Human-readable medium and data, human-readable text to store and transmit data objects consi ...
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."
TC participants include
CA Technologies
CA Technologies, Inc., formerly Computer Associates International, Inc., and CA, Inc., was an American multinational corporation, multinational enterprise software developer and publisher that existed from 1976 to 2018. CA grew to rank as one o ...
IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
,
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
,
Progress Software
Progress Software Corporation is an American public company that produces software for creating and deploying business applications. Founded in Burlington, Massachusetts with offices in 16 countries, the company posted revenues of $531.3 mill ...
,
Red Hat
Red Hat, Inc. (formerly Red Hat Software, Inc.) is an American software company that provides open source software products to enterprises and is a subsidiary of IBM. Founded in 1993, Red Hat has its corporate headquarters in Raleigh, North ...
,
SAP SE
Sap is a fluid transported in the xylem cells (vessel elements or tracheids) or phloem sieve tube elements of a plant. These cells transport water and nutrients throughout the plant.
Sap is distinct from latex, resin, or cell sap; it is a s ...
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
Hypermedia, an extension of 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-interactive linear ...
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
Atoms are the basic particles of the chemical elements. An atom consists of a atomic nucleus, nucleus of protons and generally neutrons, surrounded by an electromagnetically bound swarm of electrons. The chemical elements are distinguished fr ...
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
Applications
Applications include:
* Progress DataDirect Hybrid Data Pipeline can expose any cloud,
big data
Big data primarily refers to data sets that are too large or complex to be dealt with by traditional data processing, data-processing application software, software. Data with many entries (rows) offer greater statistical power, while data with ...
or relational data sources as OData end points
* Socrata exposes an OData
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
.
*
Microsoft Azure
Microsoft Azure, or just Azure ( /ˈæʒər, ˈeɪʒər/ ''AZH-ər, AY-zhər'', UK also /ˈæzjʊər, ˈeɪzjʊər/ ''AZ-ure, AY-zure''), is the cloud computing platform developed by Microsoft. It has management, access and development of ...
exposes an OData
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
SAP NetWeaver
SAP NetWeaver is a software stack for many of SAP SE's applications. The SAP NetWeaver Application Server, sometimes referred to as WebAS, is the runtime environment for the SAP applications and all of the mySAP Business Suite runs on SAP WebA ...
Gateway provides OData access to SAP Business Suite and SAP Business Warehouse.
*
IBM WebSphere eXtreme Scale
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
REST data service can be accessed by any HTTP client using OData.IBM developerWorks eXtreme Scale REST data service (OData)
*
Microsoft SharePoint
SharePoint is a collection of enterprise content management and knowledge management tools developed by Microsoft. Launched in 2001, it was initially bundled with Windows Server as Windows SharePoint Server, then renamed to Microsoft Office S ...
2010 and up can expose its data as OData endpoint
*
Office 365
Microsoft 365 (previously called Office 365) is a product family of productivity software, collaboration and cloud-based services owned by Microsoft. It encompasses online services such as Outlook.com, OneDrive, Microsoft Teams, programs form ...
exposes OData V4.0 APIs.
*
Salesforce
Salesforce, Inc. is an American cloud-based software company headquartered in San Francisco, California. It provides applications focused on sales, customer service, marketing automation, e-commerce, analytics, artificial intelligence, and ap ...
Connect consumes OData APIs.
* Skyvia Connect exposes cloud and database data via OData
*
Tableau
Tableau (French for 'little table' literally, also used to mean 'picture'; : tableaux or, rarely, tableaus) may refer to:
Arts
* ''Tableau'', a series of four paintings by Piet Mondrian titled '' Tableau I'' through to ''Tableau IV''
* '' 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
Redfish is a common name for several species of fish. It is most commonly applied to certain deep-sea rockfish in the genus ''Sebastes'', red drum from the genus ''Sciaenops'' or the reef dwelling snappers in the genus ''Lutjanus''. It is also app ...
Resource Description Framework
The Resource Description Framework (RDF) is a method to describe and exchange graph data. It was originally designed as a data model for metadata by the World Wide Web Consortium (W3C). It provides a variety of syntax notations and formats, of whi ...
(RDF) – a similar concept by
W3C
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working together in ...
*
GraphQL
GraphQL is a data query and manipulation language that allows specifying what data is to be retrieved (" declarative data fetching") or modified. A GraphQL server can process a client query using data from separate sources and present the res ...
- a popular protocol originally from Facebook/Meta