Exporting an AsyncAPI document for use in API Connect

You can download an AsyncAPI document from your topics in Event Endpoint Management, and then import this AsyncAPI into API Connect. After you imported the AsyncAPI document into API Connect, you can use the API Manager to socialize this event-driven API in the Developer Portal, enabling the management of events and APIs in one place.

Before you begin, ensure that you configured Event Endpoint Management as an Event Gateway Service.

Export an AsyncAPI from Event Endpoint Management

To export an AsyncAPI for your topic, complete the following steps.

  1. In the Event Endpoint Management UI, go to the Topics page, and select the topic you want to export.
  2. Click Export AsyncAPI for IBM API Connect.

    Event Endpoint Management 11.0.4 icon Click the Information tab and select Export AsyncAPI for IBM API Connect.

An asyncAPI document that describes the topic is downloaded as a YAML file.

Configure a Catalog in API Connect

See the API Connect documentation for steps on how to configure a Catalog. When selecting the gateway service to use with the Catalog, choose the Event Gateway Service that you created when you configured Event Endpoint Management as an Event Gateway Service.

Import the AsyncAPI document

To import the AsyncAPI document, complete the following steps in the API Manager UI

  1. In the navigation pane, click Develop, select the APIs tab, then click Add > API.
  2. From the toggle menu at the top of the screen, select AsyncAPI.
  3. Select AsyncAPI from Event Endpoint Management and click Next.
  4. Upload the AsyncAPI you downloaded from Event Endpoint Management. Leave the Username and Password fields empty, and then click Next.
  5. Select the Gateway tab. Enter the bootstrap server address for your cluster under Bootstrap Servers, and then click Next.

    Note: When adding the API for the first time, if the Bootstrap Servers field contains ${bootstrapServerAddress}, connections to your Kafka cluster are automatically configured.

  6. Select the Activate API checkbox, and choose your catalog to publish the API to in the Target catalog drop-down menu.
  7. Click Next again to create the API.

Publish the API and Product

See the API Connect documentation for information about how to publish an API and a Product. When publishing the Product, select the Catalog you configured earlier.

Create a subscription to the Product

In the Developer Portal for the Catalog you created, subscribe to the Product.

Use subscription credentials to consume through the Event Gateway Service

Using the credentials that you retrieved from the Developer Portal, you can configure a client application to consume from the topic.