Import one or more AsyncAPI specifications from Event Endpoint Management.
Before you begin
In this scenario, Event Endpoint Management can be viewed as the authoring tool for your
AsyncAPI, as well as the gateway service (and enforcement point provider). API Connect is the place
where the API is surfaced, and where events are found and managed. After you import the AsyncAPI,
you can use API Connect
to package it and offer it to consumers.
Complete the following tasks to prepare your API Connect and the AsyncAPI
definition file:
- Ask your cloud administrator to Register an event gateway service.
- Add the
event gateway to the catalog where you will store the API.
- To import an individual AsyncAPI to API Connect, first export
the YAML file from Event Endpoint Management. To export the YAML file from Event Endpoint Management
complete the following steps:
- In the Event Endpoint Management UI, navigate to the Topics page, and
select the topic you want to export.
- Click the Options tab, and then click Export.
- Select For IBM API Connect (contains credentials) as the export format,
and then click Export.
For more information, see Exporting an AsyncAPI document for use in API Connect in the
Event Endpoint Management documentation.
About this task
To complete this task, you must be assigned a role that has the Api-Drafts:Edit
permission. The Developer role has this permission by default; if you are assigned a custom role
that it must have this permission. For more information, see Creating custom
roles.
Note: API Designer does not support importing an Async API, you must import the API using API
Manager.
Procedure
-
In the navigation pane, click
Develop, then click .
The Select API type
screen is displayed.
-
Select the AsyncAPI tab to indicate the type of API that you want to
work with.
- You can import AsyncAPI definitions into API Connect either
individually or in bulk.
- To import AsyncAPI in bulk, complete the following steps:
- In the Create section, select AsyncAPI from Event
Endpoint Management, then click Next.
- Select the APIs you want to import.
- Click Next to import the selected files.
- Click Done on the summary page that opens.
- To import an individual AsyncAPI, complete the following steps:
- In the Import section, select Existing
AsyncAPI, then click Next.
- On the Import from file page, choose one of the following methods
for importing the file:
- Drag and drop a file:
Open another window and select a file. Drag the file to the
Select a file box, and release the file.
- Browse for a file:
Click the Select a file box. In the File Upload
window, locate the file and select it, and then click Open.
- Specify the URL of a file
In the Or specify a file URL field, type or
paste a URL for the file. Provide a username and password if they are required for accessing the
file.
- Click Next to import the selected file.
The import wizard checks the validity of the YAML, and displays a message indicating successful
validation: YAML has been successfully validated.
- Select the Gateway tab and then click
.
- Locate the
bootstrapServerAddress
property and verify that the
Value field is not empty.
If the field is empty, enter: ${bootstrapServerAddress}
before proceeding.
- Click Next to create the API.
The Summary confirms that the new API definition is created.
The new API is created, published to the sandbox catalog, and made available online (activated)
for use. If you want to publish the API to a different catalog, add the Event Gateway Service to the
catalog and then publish the API directly to that catalog.
The summary displays the API's endpoint, and the sandbox catalog's client ID and client secret,
which you can use for testing the API.
Results
Using one of the two methods discussed in the topic, you imported the AsyncAPI into API Connect.