Outbound API Call -- Service Callout or Target Endpoint

Instead of an inbound API call (Client -> API Gateway), my backend service needs to make an outbound API call. (Backend Service -> External Service)

Should this outbound API call be made through Apigee Edge? Is this a best practice?

i.e., (Backend Service -> Apigee Edge -> External Service)

If this is best practice/permitted, should I use service callout or target endpoint to call this external service?

Nathan Aw (Singapore)

2 3 4,614
3 REPLIES 3

Should this outbound API call be made through Apigee Edge? Is this a best practice?

I wouldn't say it's a best practice. I'd say it's an option. Use it if it makes sense for you. For example:

  • if you have a set of services that all want to connect with a shared service, all using the same credentials, you can use Apigee Edge to create the facade and securely manage the credentials for the external service
  • if you want to gain some additional consolidated visibility into the traffic being sent to that external service. What's the traffic volume? How is the response time trending? What's the error rate?
  • If there is some benefit to inserting a cache between the client (your service) and the external service.
  • If you want to transform the interface for external service into something more consumable. For example if the external service is a SOAP service and you'd like it to be simpler for your consuming services, you can use an Apigee Edge proxy to help you there.

should I use service callout or target endpoint to call this external service?

The answer to this question is independent of whether your client is external to your corporate network or internal. This is an implementation detail; which you use depends on how you would like to implement your API Proxy. In general the right answer is "Target endpoint" unless you have some other requirement.

Hi Dino, thanks very much. my requirement is unique where an internal backend system becomes a client making an outbound API call via Apigee to an external payment gateway. The external payment gateway becomes a target endpoint. Roles reversal, that is.

How should I configure this? the proxy endpoint is traditionally exposed to the outside world but now the internal system needs to be able to evoke this proxy endpoint. How should one best approach this?

Many thanks.

Nathan Aw

Hi Nathan,

I'm looking to address similar integration requirements. We just stood up Apigee Edge in Prod. I'm hearing a number of different opinions on 'best practices' for the use case you've outlined -- Internal systems making outbound calls to external APIs. Have you been able to find additional insights to support your decision making strategy?

For example, some are suggesting 'point to point' integrations of this nature should just pass through a proxy server while some see the benefits of central governance on Apigee being the driver.

Regards,

Ken