Importing an API from the CP4I asset repository

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

  1. In the navigation pane, click Develop icon in the API UI navigation pane Develop, then click Add > API.
    The Select API type screen is displayed.
  2. Select OpenAPI 2.0 or OpenAPI 3.0 according to which version of the OpenAPI specification your API is to be based on.
  3. In the Import section, select From asset repository, then click Next.
  4. Click Launch the asset repository.
  5. 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.
  6. Click Create from asset.
    The validity of the API definition is checked, and a message is displayed indicating successful validation.
  7. Click Next.
  8. 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.
  9. Click Next.
    The Summary panel displays messages as the API definition is created.
  10. 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.