The capabilities of an OData API allow you to support new integration use cases with SAP Cloud Integration where you expose an OData API which can be consumed by SAP Fiori applications, SAP Business Technology Platform, mobiles services or any other custom applications to fulfil user-centric scenarios
As an example, we will create an OData API which delivers product data.
Note: Go to POSTMAN, save meta data of ODATA service in .edmx format
URl: http://services.odata.org/V2/Northwind/Northwind.svc/$metadata
Step1:
Open Cloud Integration via the tab “Design, Develop and Operate Integration Scenarios” in your SAP Integration Suite Landing page.
Step 2:
Click on create and enter the details and click on save
Step 3:Navigate to Artifacts tab Click on Add ->API->select runtime profile as cloud integration and click on next
Step 4:
Select the API type AS OData API and click on next then click on the method create using wizard
Step 5:
Provide the API details as shown in the below and click on create
Step 6:
After performing above step you will be able to see below screen then click on edit
Click on Import Model wizards as shown in below
Step 7:
Select the Data Source Type as ODATA and browse the .edmx file which is saved in your local desktop then click on step 2 and select the required entity type in our case we are selecting Product then click on step3 and select finish
Step 8:
Click on bind then provide Entity sets and End Point as shown in the below, here in our case I have used free ODATA service " https://services.odata.org/V2/Northwind/Northwind.svc/ " then clock on ok
Step 9:
Now you will see below option navigate to Integration flow editor
Step 10:
Click on Navigate to Integration flow editor it will route you to the below integration flow now
Step 11:
Click on Response message mapping and map all the fields one to one
Now click on ODATA receiver connector as below and provide the details
Click on browse and select .edmx file and click on step2 then select entity and the required fields then click on finish.
Step 12:
Click on Ok and go back to the OADATAAPIproduct to deploy
Step13:
Now our ODATAAPI is ready to test for this we have to go to Monitor->Integrations and APIs
Copy the endpoint to test it using Postman
For testing the above endpoint using Postman Enter the URL you copied For Authorization choose Type as Basic Auth from the dropdown list. Enter your user Id and password of CPI tenant And finally click on Send for sending out the request to your new OData API on
If you get a response which shows that a collection ProductSet is available, then the OData API is registered on the CPI tenant.
Next, call GET operation of this OData API for retrieving the list of orders out of the OData source.
In Postman append /ProductSet to the previous Url click on send
Thanks for reading the blog, happy Integrating
Regards,
Sai Prudhvi Raj Taduva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 34 | |
| 25 | |
| 17 | |
| 16 | |
| 16 | |
| 15 | |
| 13 | |
| 13 | |
| 13 | |
| 12 |