简体   繁体   中英

Issue while accessing SAP S/4HANA Cloud API using SDK or Rest OData

I am trying to consume the SAP S/4HANA APIs from outside SAP (Postman or Java) I found a couple of options to access it

  1. Using Cloud SDK
  2. Using Rest OData endpoints

https://api.sap.com/package/SAPS4HANACloud

I observed that we can use the Cloud SDK only for the application which is deployed in SAP BTP Cloud foundry.

For Rest OData endpoints, couldn't figure out the settings for authentication for Production URL for SAP S/4HANA Cloud instance

Does anyone know if we can use the Cloud SDK or REST OData endpoints externally from local machine or from Postman?

Note: I am trying these things using a Trial account.

Disclaimer: I'm one of the developers working in the SAP Cloud SDK.

The SAP Cloud SDK for Java is a Java library for developing cloud native applications mostly within the SAP ecosystem. As such, it is of course very important to ensure that applications can be tested in different environments (eg CI/CD pipelines, and also local developer machines).

Hence, the SAP Cloud SDK can be used to connect to remote cloud services from the local machine.

Please note that the SAP Cloud SDK must be included into a Java application, which then needs to be executed - it cannot be run standalone and also has nothing to do with Postman (although it also provides a REST client).

To get started with the SAP Cloud SDK, you may want to have a look at this tutorial: https://developers.sap.com/group.s4sdk-cloud-foundry.html . It explains how to easily create a new Java application that includes the SAP Cloud SDK and how to consume an OData SAP cloud service from the SAP API Business Hub . The tutorial even explains how to get all of this working with a trial service and from your local machine!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM