How to add headers to response of Application Integration Execute endpoint

I have an App Integration flow which is called/triggered via a API trigger, consumer plans to call it synchronously and it is working fine. My output params are going back in the JSON response as below

{
    "executionId""042048d2-a2cd-411a-bcf7-5d2efdfb4801",
    "outputParameters": {
        "Response": {
            "var1""e968aa0f-ad35-4477-9f31-6ccf73fa3b8f",
            "successful"true,
            "errorMessages"null
        }
    }
}

 Now I have a requirement to add response headers to the outgoing response but am not sure how to do it as it is not a task that we configure and is actually a trigger. Can someone please shed some light on this.

Solved Solved
0 5 407
1 ACCEPTED SOLUTION

You could use an Apigee Proxy as a way to accomplish this.  Instead of directly calling the Application Integration's API Trigger, you would call the Apigee endpoint, and it would call the Application Integration API Trigger, and then when the response is being processed by Apigee, it could add headers as needed.  Application Integration's API response currently doesn't support adding headers.

View solution in original post

5 REPLIES 5

Hello @Nitin_Rawat!

The documentation doesn't mention that it is able to send response headers. I suggest that you take a look at this GCC post: Ways to trigger an Integration with API Trigger.

You can also contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!

You could use an Apigee Proxy as a way to accomplish this.  Instead of directly calling the Application Integration's API Trigger, you would call the Apigee endpoint, and it would call the Application Integration API Trigger, and then when the response is being processed by Apigee, it could add headers as needed.  Application Integration's API response currently doesn't support adding headers.

@shaaland Thanks for the workaround information which was our last resort and I hope if possible in future we can give the Api trigger all the capabilities of REST.

I have created a feature request for this!

Thanks @shaaland !!