WSO2 API Manager 4.0: A Truly Integrated Platform

Himasha Guruge
4 min readMay 10, 2021

WSO2 API Manager 4.0 release is out with significant new capabilities with the objective of enabling organizations around the globe to build better and connected digital interactions. While there are many exciting highlights such as the extensive support for event-driven architectures with Async API specification support along with various streaming protocols and cloud based analytics which you can read from https://wso2.com/news/wso2-api-manager-4-adds-support-for-streaming-and-event-driven-architectures?utm_source=li&utm_medium=orgpost&utm_campaign=li_orgpost_apim4_pr_210505, this post is to brief about the connected integration experience that is provided through the service catalog feature and the new API revision support making the product more developer friendly.

With the service catalog feature, WSO2 API Manager can be the one stop shop for all the services in the Organization. This supports converting your integration services to APIs in one click. This will be an interesting development for our existing users as well, as now they can easily utilize and convert the integrations they create through the integration profiles( Micro Integrator and Streaming Integrator) into managed APIs.

Let’s take a quick look at how this works.

Service Catalog in Action

The service catalog residing in WSO2 API Manager comprises of 3 main components; a REST API which interacts with the integration profiles ,a UI component in the API Publisher itself to present the synced integration services and a DB layer to store the metadata and specification related to the registered integration services. In a typical scenario of this process looks like below. For simplicity, let’s consider an integration service that is built using WSO2 Micro Integrator.

  1. The developer can utilize the respective tooling of the Micro Integrator profile (Integration Studio) to create the integration services with various enterprise integration patterns.
  2. The created integration project will comprise of a resources/metadata folder holding the specification (ex: Swagger specification of the REST API) and the metadata related to the developed service. The metadata.yaml file can be edited by the developer based on the requirements(ex: parameterize the host/port of the service).
  3. The Micro Integrator (MI(should have the necessary configuration added in it’s deployment.toml file which will allow the MI deployed services to be pushed in to the service catalog of the respective API Manager. For more information refer to https://apim.docs.wso2.com/en/latest/integrate/develop/working-with-service-catalog/#step-2-configure-the-micro-integrator-server.
  4. The developer deploys the integration project through a CAPP(the deploy-able unit of an integration service) into the Micro Integrator.

4.1 At this point ,internally, the Micro Integrator(MI) creates a .zip with the service related meta-data and push it to the service catalog using the REST API. Upon receive , the service will be registered in the database. If it’s an update to an already deployed service, MI will perform a GET to obtain the existing service-entry and upon matching the MD5 sums of the payloads will republish the payload to be updated accordingly. This process is supported through md5 sums and ETags of the API calls.

5. The registered services will be available under the ‘Services’ section of WSO2 API Manager Publisher portal. Users can now create a managed API from this service as usual.

Let’s see what this looks like in action.

  1. Following is a PhoneVerify API service that is developed and deployed in the Micro Integrator(enabled with service catalog feature).
Design Integration Service in Integration Studio

2. Once deployed, WSO2 API Manager publisher portal lists this service automatically as below.

Automatic Listing of Integration Services in API Publisher

3. Using the + icon of the service, create a new API which is the same process as creating an API (ex: AccountVerifyAPI) from scratch in WSO2 API Manager.

4. Now let’s assume that you want to update the existing integration service (add a new resource etc) using the Integration Studio. Once the changed integration service is updated and redeployed in the Micro Integrator, you can see below ‘outdated definition’ notification in the ‘API definition’ of the newly created AccountVerifyAPI in API Publisher portal.

Notify of API Specification Changes

5. Now you have the option to ‘re-import’ the updated definition and also to check the diff between the two definitions as below.

Update Options for the created API

While the availability of the integration services in API Manager assist you in the creation of APIs, the API revision feature provides more control to the developers to make changes to an API in a safer manner without affecting the existing API consumers. In short, API revisions allows you to create a snapshot of an API at a given time and to deploy that revision to your lower environment API gateway for further testing. With API revisions you can,

  • Safely make changes to your API definitions and policies, without affecting your production API that is consumed by users.
  • Easily test out the changes in a lower environments/gateway before publishing them into production.
  • Document the changes you make with each revision by adding a description, which helps the developers to roll back if/when required.
  • Perform portal configurations ( adding basic info, adding new subscription policies,documents etc) separately which will be visible in the developer portal.

Refer to https://apim.docs.wso2.com/en/latest/design/create-api/create-api-revisions/ for more information on API-revisions.

--

--