Tutorial: Importing an API

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

About this tutorial

This tutorial includes 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), download the findbranch_v6.txt file to your local file system. Rename this file findbranch.yaml.

Importing an API

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

    API Manager Home page

  3. On the Develop page, click Add > API.

    Add API screen

  4. Select OpenAPI 2.0.
  5. In the Import section, select Existing OpenAPI and click Next.

    Existing OpenAPI option

  6. Click Drag and drop files here or click to upload.
    Click the message to upload a file
  7. Select the findbranch.yaml file on your local file system and upload it. Then click Next.

    Validated file is ready to import

  8. The Summary page appears.

    The new API is created. Leave the Summary page open for the next step.

    Note: The API cannot be executed unless it is active.

    Summary of the imported API

Testing the imported API

To test the imported API, complete the following steps:
  1. In the Summary page, click Edit API
  2. On the Develop / findbranch page, click the Test tab in the page header.

    The imported FindBranch API already has a definition, which uses a single policy called Invoke to execute the API. This API is ready to test.

  3. To activate the API, click Target Configuration.

    FindBranch API

  4. On the Preferences window, toggle Auto-publish to set the API status to online.

    Test panel

  5. Click Send.

    Test invoke

  6. If a No response received message appears, click Open the server.

    No response message

    A new browser tab opens. If an error message appears, ignore it. Close the new tab and return to the Test tab.

  7. Click Send again. View the response in the Response section.

    Response to successful API call

What you did in this tutorial

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