OData with the Cloud SDK for JavaScript

What OData protocol versions are supported?#

OData protocol versionCloud SDK for JavaScript
OData v2โœ“
OData v4โœ“

What is OData?#

OData is an open standard for building and consuming RESTful APIs. It defines a query language to send and retrieve data via HTTP and to perform operations on data.

There are two widely used versions of the protocol: OData v2 and OData v4. The latter comes with more and improved functionality. Full details on the standards are to be found in the documentation.

What does the Cloud SDK offer?#

The Cloud SDK simplifies consumption of OData services through the following features:

Type-safe OData client#

  • We provide a type-safe OData client to build and execute OData requests in JavaScript and TypeScript.
  • We ship pre-generated OData clients for the SAP S/4HANA OData services. They are also referred to as the Virtual Data Model or VDM. You can find a list of all those services in the SAP API Business Hub (check the ODATA box).
  • We support both OData v2 and OData v4 protocols in the SAP Cloud SDK for JavaScript.

Code generator#

If you need a client for an OData service where we do not ship a pre-generated client use our versatile code generator to convert OData service definition into type-safe Java client library. You can do it for any service either developed by yourself, provided by SAP or other 3rd party.

  • Service definition usually comes in form of .edmx file and contains metadata of Odata service. The simplest way to obtain it if you have access to the service is navigating to http(s)://<service-path>/$metadata endpoint. You can easily generate a client for any 3rd party service or a service that you have build on your own.
  • You can invoke code generator via our command line interface (CLI).

Connectivity#

We simplify connectivity to SAP enabled OData services via type-safe abstractions over Destinations, Authentication and some other related concepts.

Last updated on by Artem Kovalov