Import an API with the API Designer

You use APIs to communicate with data formats. In this topic, you learn how to import different files that you want to connect an API to. You can import files from inside and outside Neptune DXP - Open Edition.

Prerequisites

  • There are no prerequisites.

Procedure

  1. In the Cockpit, go to Connectivity and click API Designer.

  2. In the API Designer, click Add.

    Result: The API configuration dialog opens. You start in the General tab.

  3. Depending on the type of data you want to connect to your API, continue with the steps in one of the sections below.

External

Import an API definition for an external API.
  1. In Type, select External.

  2. If you want to import a definition in Open API 3.0 format, select it in API format.

  3. Click Import and select an option from the drop-down menu:

    api designer import external
    1. Click Planet 9 File to import a file from your disk.

      Result: Your local editor opens.

      1. Navigate to the directory of the file and select the file and click Open.

    2. Click Swagger 2.0 to import a definition in JSON or Open API 3.0 to import a definition in JSON or YAML.

      Result: The editor opens.

      1. Write or paste the definition into the editor.

      2. Click Import.

    3. Click API Discovery Service to import an API from other Neptune DXP instances.

      Result: The API Discovery Service opens. You can see all APIs that are available to you.

      1. Click the API that you want to import.

        Result: The API Designer enters a name, operations, and definitions for the API. You can still add, change and delete settings that were made by the API Designer.

  4. Click Save.

Table Definition

Import an API for a table definition.
  1. In Type, select Table Definition.

  2. Click Import and select an option from the drop-down menu:

    api designer import tabledefinition
    1. Click Planet 9 File to import a file from your disk.

      Result: Your local editor opens.

      1. Navigate to the directory of the file and select the file and click Open.

    2. Click Table Definition to create an API from a table definition saved in Neptune DXP - Open Edition.

      Result: The Import Table Definition window opens. You see all table definitions that are available to you.

      1. Click the table definition that you want to create an API for.

        Result: API Designer enters a name, operations, and definitions for the API. You can still add, change, and delete settings that were made by the API Designer.

  3. Click Save.

Server Script

Import a server script from your disk.
  1. In Type, select Server Script and click Planet 9 File.

    api designer import serverscript

    Result: Your local editor opens.

  2. Navigate to the directory of the file and select the file and click Open.

    Result: API Designer enters a name, operations, and definitions for the API. You still can add, change and delete settings that were made by the API Designer.

  3. Click Save.

Results

  • You have imported an API for either an external API, table definition, or server script.