Introducing SAP Cloud for Customer OData API V2
The new API – c4codataapi
With the 1808 release of SAP Cloud for Customer, SAP announced the general availability of the next version of SAP Cloud for Customer OData API – V2. The new API is based on the OData service c4codataapi and it is documented here. The c4codataapi is superior to its predecessor (c4codata) for several reasons.
Better now and in the future
At first, you will notice that the new API offers more than twice as much content compared to its predecessor – c4codata. This is because c4codataapi is a virtual service that is based on more than 40 individual OData services, altogether they expose more than a thousand entities. Thanks to its innovative technology, you can consume c4codataapi just like another OData service. It has its own endpoint URL, metadata and service document. Similar to its predecessor, c4codataapi can also be used in OData notifications or be extended by adding custom fields – though extending c4codataapi is done via the underlying individual services.
But not all of its benefits are readily available yet. For example, its underlying technology is capable of supporting cross-navigations (i.e. associations between different objects). You will see such enhancements coming in future releases, ultimately making the new API even more versatile.
Together with the introduction of the new OData API, SAP also announced the deprecation and planned retirement of synchronous SOAP services (a.k.a. A2X) and the SAP Cloud for Customer OData API V1 – c4codata.
Deprecated APIs will continue to work and be supported until the February 2020 release of SAP Cloud for Customer. Then they will be retired – i.e. not supported. Therefore, we recommend our customers and partners to use the new OData API in their new projects. Similarly, we recommend our customers to enhance their existing interfaces based on the deprecated APIs to use the new OData API instead.
How to tell if you are using the deprecated OData API V1
Identifying if your interface is using c4codata is relatively easy. To do so, you can simply check the URLs of any SAP OData service requests within your interface and verify if it contains the pattern ‘…/odata/v1/c4codata/…‘. If it does, that means, your interface is using the deprecated OData V1 and you should plan on updating that with the new OData API (c4codataapi). (Please note that the v1 in the URL indicates the framework version and it is the same for all C4C OData services.)
Please note that the metadata of the old OData API (c4codata) and the new OData API (c4codataapi) are not equivalent. Hence, you will need to update your interface based on the metadata of the new OData API – c4codataapi.
How to tell if you are using a deprecated SOAP API
SAP Cloud for Customer provides two different types of SOAP (Web) Services as synchronous (A2X) and asynchronous (A2A).
Since not all SOAP services are deprecated, it might not be as obvious to check whether or not your interface is using an A2X SOAP service. To do so, go to the page with the list of SAP Cloud for Customer SOAP services and locate the SOAP service you are interested in. In order to see the technical name of the service, you will need to click on the link under the Service Description. Information on whether or not the service is synchronous is available in the detail page under the attribute “synchronous” with a value “yes” or “no”. Please note that if the service you are interested in is synchronous, you will need to plan reimplementing that using the respective entity-set of the new OData API – c4codataapi. The vast majority of the SOAP API usage is on the asynchronous (A2A) services. Therefore, only a small number of customers will be impacted by this change.