Thursday, August 4, 2022

#919 - OIC & API Gateway - effective use of Deployments

 OIC allows us to directly publish endpoints to an OCI API Gateway - 


The OIC developer chooses the Gateway and also chooses name and path prefix. This results in a new deployment to the Gateway -

Now this demos very well, but do we really want OIC developers doing this? This may suffice for some use cases, however, many organizations have API administrators whose task it is to expose apis to 3rd parties, adhering to company policies, which could include naming conventions, api granularity and policies to be applied.

Also API Gateway has a limit of 20 deployments per gateway -

 You can check out the api gateway resource limit docs here. We can, however, have multiple routes within a deployment - 

 This gives us the possibility of up to 1000 apis per gateway, which is sufficient for the vast majority of OIC customers.

Let's see how such use of deployments could work.

I create a deployment in API Gateway called CX - 

As you can see, I enter  path of /account. HTTP method is set to POST and then I simply add the OIC endpoint URL.

I add another route to the CX deployment - this time with the path set to /contact

I assume we all get the idea!

Now I need to expose another integration that retrieves an SFDC contact -

So back to the API Gateway an our CX deployment - 

Now to a simple test from Postman - first create a contact.

Now to retrieve a contact - 

So one could create deployments for functional areas e.g. HCM, ERP, CX etc. and then define up to 50 apis within each. Deployments could also be based on types of clients e.g. internal, partner, public etc.

No comments: