IBM API Management, much more user-friendly and productive than Oracle API Gateway


In recent years, API Management has become an area of interest for many CIOs trying to monetize their authored APIs, effectively turning a cost center into a profit center. To be successful, you need to make the access, provisioning, consumption, and management of your APIs as easy and user-friendly as possible. With this in mind, I wanted to compare how easy Oracle API Gateway (OAG) was versus IBM API Management (IBM APIm). I don’t believe many people know that Oracle API Gateway is really Axway API Gateway (Vordel acquisition), which Oracle OEMs and markets as their API Management product. So, I decided to see how easy it was to create a RESTful service proxy in OAG and IBM APIm. In other words, given an existing RESTful service, I wanted to simply create, in each API Management product, a RESTful proxy/endpoint that fronted the back-end RESTful service. Here are my findings:

1. All IBM APIm user interfaces are browser-based and have the same look-and-feel whereas OAG user interfaces are a combination of eclipse-RCP-based (3 of them) and browser-based applications (2 of them)
2. OAG has 5 different UIs (including design-time IDE) whereas IBM APIm only has 3
3. The Oracle API Gateway (OAG) is very technical and developer-centric whereas IBM APIm is more intuitive to use, user-friendly and business-user-oriented
4. To define a proxy for a backend RESTful service, it took 33 steps with Oracle API Gateway vs. 14 steps with IBM APIm
5. IBM APIm has testing capabilities in its design environment whereas OAG does not

Conclusion
IBM APIm is a much easier product to use than OAG, which uses a very technical (developer-centric) design-time IDE to define policies and endpoints. In addition, testing the proxy is easier in IBM APIm since it offers a “Test” button in the API view. All this translates into a longer learning curve for your business users as well as longer development cycles, which in turn makes your developers/users less productive when using Oracle API Gateway. As I mentioned above, ease-of-use is paramount to the success of an API Management roll-out. IBM API Management has been designed with this in mind whereas OAG falls short in this criterion.

Use Case Details

Here are the details of all the steps needed to create a proxy for the backend RESTful service located at:
http://banka.mybluemix.net/loans/v1/quote?loanAmount=20000&annualInterestRate=0.9&termInMonths=52

Oracle API Gateway 11.1.2.3.0
The starting point was after all daemons (gateway instance, node manager, and analytics server) were up and running.
The OAG design-environment is an eclipse-RCP-based IDE called Policy Studio. Here are the steps I had to follow to create the proxy service:
1. Launch Policy Studio
– Policy Studio is an executable you need to run from the command line
2. Select and connect to the appropriate Admin Node
– Open a connection to my localhost Node server by clicking on the correct server session
– Select the correct session from pop-down list
– Enter username and password in pop-up dialog
3. Connect to the desired Group and Gateway
– Within the correct Group, select the gateway you want to open by double-clicking on it
– Enter the passphrase for the selected gateway in pop-up dialog
4. Create a policy container and name it “LoansRESTv2”
– Select “Policies” under “Oracle API Gateway”
– Click on “Add Container” in the “Policies” view
– Enter “LoansRESTv2” in “Name:” field in “Set Container Name” pop-up dialog
– Click “OK” button of “Set Container Name” pop-up dialog
– The idea is that all policies for the Loans REST service will be in this container
5. Create the policy object and name it “LoansRESTv2Default”
– Click on “Add Policy” in the “LoansRESTv2” view
– Enter “LoansRESTv2Default” in the “Name:” field in the “Policy” pop-up dialog
– Click on the “OK” button of the “Policy” pop-up dialog
6. Instantiate a “Create REST Request” filter
– Expand the folder “Conversion” filters folder
– Drag and drop the filter “Create REST Request” to the “LoansRESTv2Default” policy canvas
7. Configure the “Create REST Request” filter
– In the “Create REST Request” dialog, enter “LoansRESTReq” in the “Name:” field
– Select “GET” from the pop-down list in “HTTP Method:”
8. Define the first parameter “Create REST Request” filter
– Click “Add” button and add the following parameter to “REST Request Parameters”:
Name: annualInterestRate
Value: ${http.client.getCgiArgument(“annualInterestRate”)}
9. Define the second parameter “Create REST Request” filter
– Again, click “Add” button and add the following parameter to “REST Request Parameters”:
Name: loanAmount
Value: ${http.client.getCgiArgument(“loanAmount”)}
10. Define the third parameter “Create REST Request” filter
– Again, click “Add” button and add the following parameter to “REST Request Parameters”
Name: termInMonths
Value: ${http.client.getCgiArgument(“termInMonths”)}
11. Navigate to the “Transaction Log Level and Message” screen of the “Create REST Request” filter
– Click on “Next >” button at bottom of “Configure a new ‘Create REST Request’ filter” dialog
12. Configure the “Transaction Log Level and Message” screen of the “Create REST Request” filter
– Set the transaction logging level and message for the filter
– Click on “Finish” button at bottom of “Configure a new ‘Create REST Request’ filter” dialog
13. Set the “LoansRESTReq” filter as the Start Node of the policy
– Right-button click on the “LoansRESTReq” filter on the “LoansRESTv2Default” policy canvas
– Select “Set as Start”
14. Instantiate a “Connect to URL” filter
– Expand the folder “Routing” filters folder
– Drag and drop the filter “Connect to URL” to the “LoansRESTv2Default” policy canvas
15. Configure the “Connect to URL” filter with the metadata of the backend RESTful service
– Enter “ConnectToLoansRESTURL” in the “Name:” field
– Enter “http://banka.mybluemix.net/loans/v1/quote?${http.raw.querystring}” in the “URL” field
– Click on the “Next >” button at the bottom of the “Configure a new ‘Connect to URL’ filter” dialog
16. Configure the “Transaction Log Level and Message” screen of the “Connect to URL” filter
– Set the transaction logging level and message for the filter
– Click on the “Finish” button at the bottom of the “Configure a new ‘Connect to URL’ filter” dialog
17. Create a success path from the “LoansRESTReq” filter
– Right-button click on the “LoansRESTReq” filter on the “LoansRESTv2Default” canvas
– Select “Add success path”
18. Select the “ConnectToLoansRESTURL” filter as the destination of the success path
– Check the “ConnectToLoansRESTURL” as the target filter
– Click “OK” button at the bottom of the “Select target filter for path” dialog

You now have your policy that takes an inbound HTTP GET request in REST format, extracts the parameters and maps them to a REST call to the backend RESTful service. The red error appears because we haven’t defined a Context yet. Let’s define it now.

19. Create an “HTTP Service” listener
– Expand “Listeners” under “Oracle API Gateway”
– Select “Oracle API Gateway” under “Listeners”
– Click on “Add HTTP Services”
20. Name the “HTTP Service” listener “LoansRESTv2Proxy”
– Enter “LoansRESTv2Proxy” in the “Name:” field of the “HTTP Services” pop-up dialog
– Press the “OK” button at the bottom of the “HTTP Services” pop-up dialog
21. Open the newly created “LoansRESTv2Proxy” listener
– Expand “Oracle API Gateway” under “Listeners” or scroll down “Child Items” in the “Oracle API Gateway” view to see the HTTP Service you just created “LoansRESTv2Proxy”
– Click on “LoansRESTv2Proxy” HTTP Service
22. Open the Ports view of the “LoansRESTv2Proxy” listener
– Double click on the “Ports” icon under “Child Items” in the “LoansRESTv2Proxy” view
23. Add an “HTTP Interface” as a port of the “LoansRESTv2Proxy” listener
– Click on the “Add” button in the “LoansRESTv2Proxy – Ports” view and select the “HTTP Interface” entry from the pop-down list
24. Configure the “HTTP Interface” port
– In the “Configure HTTP Interface” dialog, enter the following values:
Name: LoansRESTv2ProxyPort
Port: 8082
– Click the “OK” button at the bottom of the “Configure HTTP Interface” dialog
25. Open the Paths view of the “LoansRESTv2Proxy” listener
– Double-click on “Paths” in the “LoansRESTv2Proxy” view
26. Add a “Relative Path” as a path of the “LoansRESTv2Proxy” listener
– Click on the “Add” button in the “LoansRESTv2Proxy – Paths” view and select “Relative Path” from the pop-down list
27. Configure the “Relative Path” path
– Enter “/quote” in the “When a request arrives that matches the path:” field in the “Resolve path to Policies” dialog
– Then click on the “…” located next to the “Path Specific Policy:” field
28. Link the policy “LoansRESTv2Default” to the relative path
– Check the policy named “LoansRESTv2Default” in the “Path Specific Policy:” dialog
– Press the “OK” button in the “Path Specific Policy:” dialog
– Press the “OK” button in the “Resolve path to Policies” dialog

Notice that the Error in the “ConnectToLoansRESTURL” filter is now resolved

29. Start the deployment process
– Click on the Deploy icon located at the top right corner of the Policy Studio IDE. Or press F6
30. Specify the group and gateway you want to deploy your changes to
– From the pop-down list next to the “Group” label, select the group (env) you want to deploy to
– Check the gateway (plan) you want to deploy your updates to
31. Perform the actual deployment
– Click on the “Deploy >” button at the bottom of the “Deploy” dialog
32. Acknowledge completion of the deployment
– Click on “Finish” button at the bottom of the “Deploy” dialog once deployment is finished
33. At this point, you can test your proxy
– You can test your proxy by opening a browser and entering the following URL:
http://localhost:8082/loans2?loanAmount=20000&annualInterestRate=0.9&termInMonths=52
The HTTP GET request hits port 8082 and flows through Oracle API Gateway, which enforces the policy defined in the previous steps, effectively routing the message to the backend RESTful services it is fronting. The returned message is displayed on the browser

IBM APIm v3
The starting point was after all components (gateway and management nodes) were up and running. In addition, to make this scenario comparable to OAG, the environment and plan were already created.
1. Open a browser, navigate to the URL https://<managementnode>/apimanager and login

Step1

2. Select APIs from the navigation pane and click the + REST button to create a new REST API

Step2

3. Populate the fields as shown in the screenshot below. When complete, click the Add button

Step3

4. Click on the Edit icon to define the specific resources that are available for the API

Step4

5. To create a single quote resource that supports a GET operation, click + Add a Resource

Step5

6. By default, the HTTP methods GET and POST are displayed. Remove the POST method by clicking the X inside of the Post button

Step6

7. Populate the fields as shown in the screenshot below. In the Path field, enter “quote?loanAmount=20000&annualInterestRate=0.9&termInMonths=52” . When complete, click the Add button

Step7

8. Now that the quote resource has been defined, click on the Edit icon to edit the resource details

Step8

9. Enter descriptions for each parameter as shown in the screenshot below, and select the required check box for each one

Step9

10. Click on the Response Body tab and enter the displayed JSON into the text area

Step10

11. For this resource you will simply proxy the existing service. Select the Implementation tab and click the Proxy button and enter the following URL into the “PROXY URL” field
http://banka.mybluemix.net/loans/v1/quote

Step11

12. Click Save button

Step12

13. To test your newly created proxy, click the Test tab

Step13

14. Enter the parameter values as shown in the screenshot below, and click the Invoke button

Step14a

The response from the backend RESTful service should look like:

Step14b



Categories: Technology

Tags: , , ,

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: