Saturday, July 26, 2025

#1077 OCI API Gateway & OIC

OCI API Gateway can be used to manage access to your your integration apis. This post goes into a bit more details on the mechanics of such, for different types of integrations.

The initial setup of the gateway is detailed here.

Now to my integrations - 

First HalloWelt - 

Let's expose HalloWelt via the gateway.

That's it - 

Pick up the endpoint, once created - 

Test from Postman -


Now to the next integration - 

This integration pushes a file to OIC file server.

Now to test this from Postman, firstly I take the curl representation of the request - 

and I drop it into Postman. I could also have copied the endpoint url from here -


 




That worked fine - let's look at the postman console - 

Note the Content-Type header.

Now I expose this via the api gateway. For this to work, I need to set the following in the route -


As you can see, I'm explicitly setting the headers. In fact, I'm passing on what I receive from postman. Note the syntax for referring to the Content-Type - ${request.headers[Content-type]}.

I now run this from postman - 


Let's remove the Header transformation - 





 






I get the following error in postman -

Exception while processing Trigger request for </ic/api/integration/v2/flows/rest/project/AA_LARGEFILEPROCESS/WRITELARGEFILETO_V2/1.0/file>. Error Message : Unsupported media type in the request 






 

No comments: