Fix pack 5 introduces support in App Connect Enterprise for pushing REST APIs to IBM API Connect. REST APIs which have been developed and deployed to the ACE runtime, can then be exported into IBM API Connect, which you can then use to manage and publish your APIs. This new capability can be driven from the IBM App Connect Enterprise web user interface, using the mqsipushapis commmand, or using the ACE product’s administrative REST API. The versions of IBM API Connect which are supported by this feature are:
- IBM API Connect 2018
- IBM API Connect Enterprise 5.0
- IBM API Connect Professional 5.0
- IBM API Connect Essentials 5.0
- IBM API Connect for IBM Cloud
Starting from the ACE web user interface, you can now choose the option to Push REST APIs to API Connect from the menu shown in the screenshot below:
Selecting this menu action will launch a wizard which begins by gathering information about the version of the API Connect system that you are connecting to, the connection details (Host and Port) and your connection credentials. When the connection has been established, values are retrieved from the API Connect system which allow the user to specify the target API Connect organization, product, and catalog. Once you’ve chosen the target organization, you can specify an existing product or create a new one, defining the title, name, and version of that product. If you want to stage the product, you can optionally also specify the name of the Catalog in which you want it staged. The next page in the dialog invites users to choose which REST APIs are to be exported to API Connect, as shown below:
The next page in the dialog afford the chance to override the host name and port that will be used by IBM API Connect to invoke the pushed APIs. When doing this you can specify HTTP proxy details, HTTPS proxy details, or both. The last step involves a status page showing the progress and result of the push to API Connect.
For users wishing to script this kind of administration, the mqsipushapis command is provided which offers the same functionality. Here’s an example of the command with its many different options!
mqsipushapis TESTNODE --integration-server default --apic-host mysystem
--apic-port 443 --apic-version v5 --apic-username testuser --apic-password mypassword
--apic-org myOrg –-apic-catalog-title MyCatalog --apic-product-title MyProduct
–-apic-product-name ProdName –-apic-product-version 2.0.0 --rest-apis myapi1:myapi2:myapi3
For the security conscious, you can choose to be prompted for the IBM API Connect password rather than entering it in the command, by specifying --apic-password ""
(an empty string in double quotes). The next example below shows how you can use the mqsipushapis command to push REST APIs to IBM API Connect Version 5 on IBM Cloud, and stage the product in the catalog:
mqsipushapis --admin-host localhost --admin-port 7600
--apic-host https://apimanager.eu-gb.apiconnect.cloud.ibm.com --apic-port 443
--apic-version v5-on-ibm-cloud --apic-api-key ab209e28-6ajd-1965-8916-7457d176b0c7
--apic-org myOrg –-apic-catalog-title MyCatalog --apic-product-title MyProduct
--rest-apis myapi4:myapi5 --apic-disable-certificate-verification
Both the web user interface and the command are based upon methods provided by the ACE administrative REST API, which can also be invoked directly using a REST client such as the Curl command for example. Three actions are provided:
- POST /apiv2/api-session This connects to a target API Connect environment and returns API Connect Organisations, Products and Catalogs. The response also provides an
ACE-Session-xxxxxxxx
cookie which must be set on the following two API invocations.
- POST /apiv2/api-push-api This creates / updates a single draft API and can be used to create / update a draft product and add the draft API to the draft product.
- POST /apiv2/api-stage-product This stages a product in a catalog.