Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
10,555

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

SaiPrudhviRajTaduva_0-1740415090818.png

Step1:

Open Cloud Integration via the tab “Design, Develop and Operate Integration Scenarios” in your SAP Integration Suite Landing page.

SaiPrudhviRajTaduva_0-1740400555151.png

Step 2:

Click on create and enter the details and click on save

SaiPrudhviRajTaduva_2-1740401083296.png

SaiPrudhviRajTaduva_3-1740404698275.png

 

Step 3:Navigate to Artifacts tab Click on Add ->API->select runtime profile as cloud integration and click on next

SaiPrudhviRajTaduva_4-1740404858974.png

SaiPrudhviRajTaduva_5-1740404986836.png
Step 4:

Select the API type AS OData API and click on next then click on the method create using wizard

SaiPrudhviRajTaduva_7-1740405145217.png

SaiPrudhviRajTaduva_8-1740405278191.png

Step 5:
Provide the API details as shown in the below and click on create

SaiPrudhviRajTaduva_9-1740405385944.png

Step 6:

After performing above step you will be able to see below screen then click on edit

SaiPrudhviRajTaduva_10-1740405526981.png

Click on Import Model wizards as shown in below

SaiPrudhviRajTaduva_11-1740405582297.png

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

SaiPrudhviRajTaduva_13-1740405815286.png

SaiPrudhviRajTaduva_14-1740405986584.png

SaiPrudhviRajTaduva_15-1740406073391.png

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

 

SaiPrudhviRajTaduva_0-1740410230913.png

SaiPrudhviRajTaduva_1-1740410284210.png

Step 9:
Now you will see below option navigate to Integration flow editor

SaiPrudhviRajTaduva_3-1740410648216.png

Step 10:
Click on Navigate to Integration flow editor it will route you to the below integration flow now 

SaiPrudhviRajTaduva_4-1740410780671.png

Step 11:
Click on Response message mapping and map all the fields one to one

SaiPrudhviRajTaduva_5-1740410909499.png
Now click on ODATA receiver connector as below and provide the details

SaiPrudhviRajTaduva_6-1740411004616.png

Click on browse and select .edmx file and click on step2 then select entity and the required fields then click on finish.

SaiPrudhviRajTaduva_7-1740411076770.png

SaiPrudhviRajTaduva_8-1740411212335.png

Step 12:

Click on Ok and go back to the OADATAAPIproduct to deploy

SaiPrudhviRajTaduva_9-1740411407475.png

SaiPrudhviRajTaduva_10-1740411483544.png

Step13

Now our ODATAAPI is ready to test for this we have to go to Monitor->Integrations and APIs

SaiPrudhviRajTaduva_11-1740411669672.png

Copy the endpoint to test it using Postman 

SaiPrudhviRajTaduva_12-1740411785887.png

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

SaiPrudhviRajTaduva_13-1740412009221.png

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

SaiPrudhviRajTaduva_15-1740412422459.png

 

Thanks for reading the blog, happy Integrating

Regards,
Sai Prudhvi Raj Taduva

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4 Comments