OData with Apigee

Hi Team,

Can any one suggest me how can we work with OData service through Apigee.

I followed the below link but how can we recognize whether it is a OData Service or not.

https://community.apigee.com/questions/2624/odata-version-supported.html

1 2 2,802
2 REPLIES 2

Yes - you can serve OData through an Apigee proxy.

Apigee Edge acts as a proxy, and with no configuration, it passes through the request it receives to the backend, and passes through the response it receives from the backend to the original requesting client.

If that request happens to be an OData request, then no problem. If the response happens to be an OData payload, no problem.

You may ask - well if Apigee is just passing things through, why use Apigee at all? Usually people do this to gain some other benefit, for example:

  • gain analytics insight. If every request goes through a proxy, you can gain insight into the call volume, trends, client usage, performance, and so on. No need to change the backend to collect metrics. This is especially nice if you have a disparate set of backends.
  • security mediation. For example if you would like to add OAuth token verification to a backend service that doesn't speak OAuth. Even in the case that the backend system does speak OAuth, if you have disparate backends, it's beneficial to consolidate all of them onto one OAuth token provider, and that provider and verifier could be Apigee. Or, extending beyond basic OAuth, what if you wanted to add in an OpenID Connect authorization model? Apigee can do that too.
  • Caching.
  • routing
  • etc.

With OData, there is one issue that you'll need to be aware of. OData payloads will contain hrefs pointing to the location of the actual OData server. If Apigee is acting as the callable endpoint, then the client is using https://apigee-hosted-endpoint.example.com . But the OData payload may contain an href referring to https://internal-server.example.com , and this latter endpoint isn't accessible from the client. So your "pass through" proxy in Apigee Edge needs to re-write the hrefs in the OData payload. Like Apache mod_proxy ProxyPassReverse, except applying it to the actual OData payload.

This isn't hard to do; I would just use a JavaScript policy with a Regex string replacement.

Helpful?

If you have a specific question, a specific problem you're facing, I can try to help with that too. Provide some more details, and we'll explore it.

Thanks for your response Dino.

I need your help regarding OData service through Apigee.

Can you give me a sample proxy which is using OData service.

I mean that OData service means we have to use some REST API URL and creates a proxy in Apigee?

Can you suggest me in a right direction.