Wednesday, April 12, 2023

OIC - Create an API Gateway to call Oracle Integration REST service

Usecase: we will create an API gateway in OCI console and call rest OIC service.

Highlevel steps:

  1. Create a rest OIC service which to be called from API gateway.
  2. Create a VCN(it will create two subnets : public and private)
  3. Create a security list(to get access) and add to the public subnet of the VCN
  4. Create an API Gateway
  5. Add deployment of the rest service to the gateway
  6. Take the API gatway deployem endpoint url and test in Postman

Detailed steps:

Login to OCI console >> networking >> Virtual Cloud Networks

Select compartment >> start VCN Wizard

Start VCN wizard

Provide VCN name and compartment.

Click create.

VCN created. Click View VCN.

2 subnets created >> private and public

Click Security Lists

Create Security List

Provide security list name, compartment >> add ingress rule

Source  CIDR :
Destination port range : 443

Security list created >> go to subnets

Open public subnet 

Add security list

Select the compartment >> add the security list.

Developer services >> API Management >> Gateways

Select compartment and create gateway.

Provide Gateway name, type, compartment >> provide VCN name, select public subnet.

Gateway created.

Deployments >> Create deployment

Provide api gatway details:

Name: demo-api
Path prefix : /demo-api/1.0
Compartment: dev

Selecting no authentication which is basic authentication.
Note: you can also go for single or multiple authentication options.

Provide route Service details:
Path: /testHello
Method: POST
Backend type: HTTP

Provide different time out paramters >> click show route request policies

Add the Authorization : Basic base64 representation of username:passoword


Create the deployment

Copy the endpoint of the deployment for testing.

Open in postman >> select basic authentication >> provide OCI user and password

Test url: OCI deploywent Endpoint/path of the URL added in the deployment.

Body >> raw >> json
Provide input data

Hurahha!!! It worked. We have received the response.

No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...