Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

call application integration from api proxy based on a condition

What is the best practice to call an application integration from an api proxy. can it be done using a service callout and how it can be configured? 
the only thing I found in the documentation was to create an app integration target proxy.

the other option was to trigger this App integration using curl   


https://cloud.google.com/apigee/docs/api-platform/integration/getting-started-apigee-target-endpoint

https://www.googlecloudcommunity.com/gc/Integration-Services/Ways-to-trigger-an-Integration-with-API...

I used this approach (Integration callout & set integration)

I seem to have an issue with receiving the response of IntegrationCallout 
the application integration executes successfuly and returns its output to an output variable named convertedresponse but I don't know why it's not received in the proxy 


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<IntegrationCallout continueOnError="false" enabled="true" name="Int-CallAppIntegration">
  <DisplayName>Int-CallAppIntegration</DisplayName>
  <IntegrationRequest ref="SIR-set-integration-request"/>
  <Request clearPayload="true">IntReq</Request>
  <Response>convertedresponse</Response>
</IntegrationCallout>
0 2 226
2 REPLIES 2

Hi @dareenhamdy,

Welcome to the Google Cloud Community!

You’re correct, you can use both the ServiceCallout policy or curl to trigger an application integration from an API proxy. If you prefer to use the ServiceCallout policy, here are a few helpful references:

Note: Application Integration is functionally identical to Apigee Integration. You might want to repost this thread on the Apigee community forums, where other users could offer more guidance or alternative solutions.

If you’re familiar with antipatterns, you can follow this policy antipattern to Use Service Callout Policy to invoke a backend service in a No Target API Proxy.

Lastly, you could use Gemini Code Assist to build and provide recommendations to your Application integrations.

I hope this helped!

that's very helpful is there a complete example to show me how can we do it using those policies ?

I seem to have an issue with receiving the response of IntegrationCallout 
the application integration executes successfuly and returns its output to an output variable named convertedresponse but I don't know why it's not received in the proxy 


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<IntegrationCallout continueOnError="false" enabled="true" name="Int-CallAppIntegration">
  <DisplayName>Int-CallAppIntegration</DisplayName>
  <IntegrationRequest ref="SIR-set-integration-request"/>
  <Request clearPayload="true">IntReq</Request>
  <Response>convertedresponse</Response>
</IntegrationCallout>
 
 

 

Top Labels in this Space