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.
- In the Event Endpoint Management UI, go to the Topics page, and select the topic you want to export.
-
Click Export AsyncAPI for IBM API Connect.
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
- In the navigation pane, click Develop, select the APIs tab, then click Add > API.
- From the toggle menu at the top of the screen, select AsyncAPI.
- Select AsyncAPI from Event Endpoint Management and click Next.
- Upload the AsyncAPI you downloaded from Event Endpoint Management. Leave the Username and Password fields empty, and then click Next.
-
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. - Select the Activate API checkbox, and choose your catalog to publish the API to in the Target catalog drop-down menu.
- 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.