Tutorial: Importing an API

This tutorial shows you how to import an existing OpenAPI 2.0 definition.

About this tutorial

In this tutorial you will complete the following lessons:
  1. Importing an API
  2. Testing the imported API

Before you begin

Note: The Sandbox catalog must be configured to use either a DataPower® Gateway (v5 compatible) or a DataPower API Gateway or both. See Creating and configuring Catalogs.

If your Sandbox catalog uses a DataPower Gateway (v5 compatible) (as one of the gateways, or as the only gateway), download the findbranch.txt file to your local filesystem. Rename this file findbranch.yaml.

If your Sandbox catalog uses a DataPower API Gateway, download the findbranch_v6.txt file to your local filesystem. Rename this file findbranch.yaml.

Importing an API

To import an API, complete the following steps:
  1. Log in to API Manager.
  2. In the Welcome page, click the Develop APIs and Products tile.

    APIM screen

  3. Click Add > API.

    Add API screen

  4. In the Import section, select Existing OpenAPI. Click Next.

    Select Existing API

  5. Click Browse. Select the findbranch.yaml file on your local filesystem.
  6. Click Next.

    Import file

  7. Check Activate API. Click Next.

    Publish API with Product

  8. The new API is created, along with a product. Click Edit API.

    Import summary

Testing the imported API

Note: Due to Cross-Origin Resource Sharing (CORS) restrictions, the assembly test tool cannot be used with the Chrome or Safari browsers on the macOS Catalina platform.
To test the imported API, complete the following steps:
  1. Click Assemble.

    Findbranch API

  2. Click the Test icon The Test icon.

    Assemble page

  3. On the test Setup pane, select the get /details in the Operations section.

    Test setup

  4. Scroll down. Click Invoke. You may encounter a yellow error box with a URL embedded in it. Click this URL to override a browser certificate error.

    Test invoke

  5. Click Invoke again. The response contains branch data.

    Repeat invoke

What you did in this tutorial

In this tutorial, you completed the following activities:
  • Imported an API definition.
  • Tested an API.