Boomi

Implement API Proxy component in Boomi

API Proxy components are deployable components that allow for the direct proxying of a request through an API Gateway to a service which is not served through an Atom, Molecule, or Atom Cloud.

Problem Statement:

“How to implement API Proxy component in Boomi”.

In this use-case, we will make use of a Open API Specification URL to consume the mock API. Let us see how to configure API Proxy Component in Boomi.

Step 1: On the Build page click on create new drop-down to create component.

Step 02: Select API Proxy component and click create.

Once you click on create button API Proxy component is created as shown below, then rename the component as appropriate. Here we will be renaming as “DEMO | API Proxy”.

Step 03: Click on the import OpenAPI Specification file, then a new pop-up will appear. Here we can import by two methods. And we are going with the second method i.e, import from a URL, then click next.

Mock API URL :-

URL: https://raw.githubusercontent.com/apigee/api-platform-samples/master/default-proxies/helloworld/openapi/mocktarget3.0.yaml

Step 04: Paste the above URL in the External service URL and click next again next.

Step 05: Select  http://mocktarget.apigee.net as API Server URL and click next.

Step 06: It will automatically takes the API type, title, published version, etc,. Then click Finish.

Step 07: Then we need to give Base API path and save it.

Create package and deploy to Environment:

Step 08: Create packaged component of the API Proxy component.

Step 09: Deploy it to an environment.

Step 10: To use Gateway, in the Shared Web Server the API type should be Advanced and Authentication Type should be Gateway.

Implementing in Gateway:

Step 11: Click on services drop-down and select API Management. Then click on configure APIs and Applications > Deployed API. Here we can see our deployed API Proxy component.

Step 12: To create a new Plan, click on Configure Server > Plans then create a new Plan.

Step 13: Here we name the plan as DEMO_Unlimited, and keep everything as unlimited and save it.

Step 14: To provide Authentication, click on Configure Server > Authentication > New Authentication Source.

Then in Authentication Source Name we will be giving “DEMO_Basic_Auth” and in Identity provider type we will select “Basic authentication (Gateway)”.

Step 15: To configure Basic Authentication we will start from Right hand side i.e., Roles. Click on add role in role name we will pass “Trainee”.

Step 16: Click on Groups > add group. Pass the group name as “Developers” > next > Select the Role which we have already assigned(Trainee) > next > finish.

Step 16: Click on the users , add users,  then we need to create user name and password and click next.

After that select the Group (Developers) then click finish then save it. At last, you will see the below response.

Step 17: We need to add the created authentication to our deployed API. Click on API key Controlled

Step 18: Select Authentication type as Authentication provider and Authentication source “Demo_Basic_Auth”.

Step 19: We need to add a plan to the deployed API. Click on the incomplete > search for the created plan (DEMO_Unlimited) > add to API deployments.

Step 20: Our plan has been added to the deployed API, then turn ON the toggle button so that we make a keyless Plan and save it.

Step 21: Go to Configure API and Application and click on deployed API. Then click on view, a new tab will open as shown below. Click on the Rest and copy the Base URL path that is  http://localhost:8077/ws/rest/Demo .

Consuming in Postman:

Step 22: Open Postman (API testing tool) and paste the copied Base URL path and in Auth (Authentication) select the Basic Auth.

Step 23: Pass the user’s name and password, then click on send button. You will get the below output as response.

References:

  1. https://help.boomi.com/docs/atomsphere/api%20management/topics/int-api_proxy_components_24a9612a-2e4a-4ae9-ba66-88ba1b3f9c97/
  2. https://docs.apigee.com/api-platform/tutorials/create-api-proxy-openapi-spec#testtheapiproxy

Author

Sharukh Khan

Leave a comment

Your email address will not be published. Required fields are marked *