Apigee X Set Integration Callout Policy throwing error

Hello @folks 

I've been trying to connect the Apigee-X API proxy with Apigee Application INtegration where I'm trying to send JSON payload as a request to the API proxy and it should reflect in the GCP cloud SQL instance via the application integration pipeline 

In apigee, I've used two policies one is to set an Integration request 

abhishekchauhan_0-1715601791033.png

and another one for Integration Callout 

abhishekchauhan_1-1715601853382.png

and In application Integration, I configured the connector for Cloud SQL which is working and also tried to test via dummy data that is also able to update the table in SQL instance

abhishekchauhan_0-1715602438429.png

But when I try to connect this via APIGEE-X API it fails by throwing this response

abhishekchauhan_3-1715602044903.png

Any Suggestion would be of great help 

Thanks

Abhishek

 

5 1 85
1 REPLY 1

@abhishekchauhan - Few points I wanted to make

  1. You use Integration Callout only if you want to make a separate callout to an integration as part of your API proxy execution
  2. You should be using an Integration Target to make a call to your integration backend

Now coming back to get your code to a working state:

I would suggest, create a new proxy, using the wizard and select the integration you want the proxy to point to. That will automatically create the Integration target and also pre-populate the Integration Request policy for you. 

From the Integration Request policy you shared, I see that you have a <Request> tag added. Thats not needed. Just use the <Parameters>. I am assuming that the Parameter name you are using in the policy is the "input" variable in your actual Integration as well.

For your reference, I created a simple Integration with an API Trigger and a Send Email task. I created an input variable called "requestObj" of type JSON and published the integration.

Now in the Apigee create proxy wizard, I selected the above created integration and clicked Create. It generated everything for me pointing to that integration.

I just used the following code for Integration request

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SetIntegrationRequest continueOnError="false" enabled="true" name="SIR-set-integration-request">
  <DisplayName>SIR-Set Integration Request</DisplayName>
  <ProjectId>blah</ProjectId>
  <IntegrationName>apigee-test</IntegrationName>
  <IntegrationRegion>us-west1</IntegrationRegion>
  <ApiTrigger>api_trigger/apigee-test_API_1</ApiTrigger>
  <Parameters>
    <Parameter name="requestObj" type="json" ref="request.content"/>
  </Parameters>
</SetIntegrationRequest>

The Integration target had the following code

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<IntegrationEndpoint name="default">
  <AsyncExecution>false</AsyncExecution>
</IntegrationEndpoint>

Thats it. I deployed the proxy and made a call with a dummy payload. That got set in the "requestObj" input parameter and it executed as expected. 

Hope that helps