Tired of googling and reading about OData without having a chance to play with it? Get happy then, this post is for those pragmatics like me that enjoy learning by doing rather than dealing with theory. If you enjoy the trial and error process, I can assure you that you won’t be disappointed.

What is OData? Open Data Protocol (OData) is an open protocol to allow the creation and consumption of queryable and interoperable RESTful APIs in a simple and standard way. It defines an abstract data model (EDM) and a protocol (based on REST) that let any client access information exposed by any data source.

The anatomy of an OData service A URI used by an OData service has up to three significant parts: the service root URI, resource path and query string options.

Formatting the response With the exception of the metadata of the service (which is expressed in CSDL), all responses may be formatted in Atom or JSON, either by using the $format=json or $format=atom options or by setting the “Accept” header (i.e. “application/json”). The default is Atom/AtomPub. ex. http://services.odata.org/OData/OData.svc/?$format=json

Querying the service To query the service, the following options can be combined to refine the search:

We'd love to hear your opinion on this post

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

MuleSoft provides the most widely used integration platform for connecting any application, data source or API, whether in the cloud or on-premises. With Anypoint Platform®, MuleSoft delivers a complete integration experience built on proven open source technology, eliminating the pain and cost of point-to-point integration. Anypoint Platform includes CloudHub™ iPaaS, Mule ESB™, and a unified solution for API management™, design and publishing.