cancel
Showing results for 
Search instead for 
Did you mean: 

ODATA to REST

Hi everyone,

I'm exploring ElasticSearch and doing a PoC to hookup the tool into SAP API Management. The desire is provide ODATA endpoints in SAP API Management, and translate the requests on the fly to Elastics own REST APIs.

Has anyone used SAP API Management to create an API Proxy that behaves/accepts ODATA requests, do some translation and pass the request off to a REST backend system in JSON format?

I guess the other question is 'should' we be using SAP API Management in this way? I'm aware of 3rd party tools, specfically one by CData which seems to provide this functionality. But before exploring that further I want to see just what we could do with SAP API Management out of the box.

Accepted Solutions (1)

Accepted Solutions (1)

divyamary
Contributor

Hi Logan,

This should be doable in API Management. So you can receive the data in Odata format , then use an Extract Variable policy to read through in the coming request or outgoing response. Since Odata supports both XML or JSON you can extract the data that you would like from the payload either using XPath or JSON Path. Next use an Assign Message policy to create the new JSON structure that you would like and finally use the Service Callout policy to call your REST APIs.

Alternatively you can leverage the JavaScript policy for this purpose.

Thanks and Best Regards,

Divya

0 Kudos

Thats perfect! Thank you so much Divya 🐵

Answers (0)