IBM API Management Plugin for Ready! API

ready-ibm-apim-plugin

A plugin for Ready! API that allows you to import APIs directly from the IBM API Management developer portal as well as publish an API to the IBM platform.

Installation

Install the plugin via the integrated Plugin Repository available via the Plugin Manager in Ready! API 1.X

Usage

There are two parts to this plugin – one designed to help people consume APIs that are hosted on the IBM API Management portal and one designed to help people who provide APIs via the IBM portal.
 



To consume APIs from the IBM API Management portal:

  1. There are two ways to import an API from the IBM API Management portal:

  •  "Add API From IBM API Management Portal" option on the Project menu in the "Projects" tab (available via right-click as well)

  •  "IBM API Management Portal" option in the "Create project from..." drop-down when creating a new project

  1.  In either case, you will be prompted for the endpoint to an IBM Developer Portal that exposes API metadata. The first time you launch the plugin, you will also have to enter your login and password for the portal. If you want Ready! API to remember your credentials, click the checkbox.

  2. After you submit the endpoint and your credentials, Ready! API will show you  a list of available APIs. The IBM API Management portal supports both REST and SOAP. Ready! API will display the protocol indicator next to the name of the API. You can select one or more APIs to read into Ready! API. Now you can easily:

  • create a virtualized version of the API for sandboxing/simulation purposes

  • send ad-hoc requests to the API to explore its functionality

  • create functional tests of the API which you can further use to create Load Tests, Security Tests and API Monitors
     


     

The IBM API Manager plugin supports both SOAP and REST; these instructions apply to both.

To provide APIs for the IBM API Management portal:

  1. After you have finished testing and are ready to make your API available on the IBM API Management portal, right-click on the API in your Ready! API project. Select Export to IBM API Manager.

  2. You will be prompted for the endpoint to the API Manager. The first time you launch the plugin, you will also have to enter your login and password for the API Manager. If you want Ready! API to remember your credentials, click the checkbox.

  3. After you enter the endpoint and your credentials, you will need to supply information that is specific to your API and how you want it to be displayed and used on the portal. Ready! API defaults some of the values based on the API in your project but you can override those values if you want the published information to be different. 

  4. When you click OK, Ready! API will launch the API Manager endpoint you entered so you can validate and update the information on the portal.

Installing the Certificate

When using the IBM API Manager Plugin to export APIs to the IBM portal, you may see the following error:



 

This is because IBM API Manager uses a self-signed certificate. To resolve this issue,  add the IBM API Manager certificate to JVM’s trust store by following these steps:

  1. Obtain the public certificate of your IBM API Manager. The simplest way to do this is to get it from a browser. From your API Manager console window, click on the lock icon in the address bar. A balloon will display about the API Manager web page. (This is for Chrome – other browsers may vary)

  2. Click on the Certificate information link to display the information dialog:

  3. Click on the Copy to File button. The Certificate Export Wizard should appear.

  4. Choose the following from the Export File Format Wizard:

  • DER encoded binary format on the first page

  • Exported certificate file location on the second page

  1. Click Finish.

  2. Now that you have the certificate saved in a file, you need to add it to your JVM's trust store. At $JAVA_HOME/jre/lib/security/ , there is a file named cacerts. This file comes with Java and contains the public certificates of the well-known Certifying Authorities. To import the new certificate, you should run keytool as a user who has permission to write to cacerts:

keytool -import -file <the cert file> -alias <some meaningful name> -keystore <path to cacerts file>

 Keytool will most likely ask you for a password. The default password as shipped with Java is "changeit". Almost nobody changes it. J After you complete these relatively simple steps, Ready! API should be able to export your API to IBM API Manager.