If you are using API Connect with IBM® Cloud Pak for
Integration, you can import an API
definition from the CP4I asset repository.
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 it
must have this permission. For more information, see Creating custom
roles.
Procedure
-
In the navigation pane, click
Develop, then click .The Select API type
screen is displayed.
- Select OpenAPI 2.0 or
OpenAPI 3.0 according to which version of the OpenAPI specification your API
is to be based on.
-
In the Import section, select From asset repository, then click
Next.
- Click Launch the asset repository.
- From the asset repository listing, click the name of the API that you want to
import.
An API explorer window opens, enabling you to examine the details of the
API.
- Click Create from asset.
The validity of the API
definition is checked, and a message is displayed indicating successful
validation.
- Click Next.
- Optional:
Select Activate API if you
want to immediately use the API for further development and testing.
Note:
- When you select the Activate API option, API Connect automatically completes the
following actions:
- Creates a draft product, adds the API to the product, and publishes the product to the Sandbox
catalog so that the API is available to be called. The product has the title
api_title auto product. This product is not visible in the
Develop view and you cannot delete it directly. However, if you delete the
API the draft product is deleted together with the API; see Deleting an API
definition. The product is visible in any catalogs to which it is published. If you want to
remove the product from a catalog, you must do this separately; see Removing a product
from a catalog
- Subscribes the Sandbox test application to the product so that you can immediately test the API
in the test environment. For information on testing an API, see Testing an API.
- You cannot use the Activate API option if lifecycle approval
is enabled in the Sandbox catalog for the Stage, Publish, or Replace actions. If any such lifecycle
approvals are enabled, then to be able to use the Activate API option they must be disabled;
for information on lifecycle approval settings, see Creating and configuring catalogs.
- To use the Activate API option, you must be assigned a
role that has the
Product:Manage and Subscription:Manage
permissions. The pre-supplied Developer role has these permissions by default;
if you are assigned a custom role it must have these permissions.
For more information, see Creating custom
roles.
- Click Next.
The Summary panel displays messages
as the API definition is created.
-
Select one of the following options:
- To further configure your API, click Edit API. For details, see Editing an API
definition.
- If you do not want to configure your API further at this time, click the
Develop link in the breadcrumb trail to return to the welcome page; you can
then move on immediately to another task. For details on how to configure your API later, see Editing an API
definition.