Exposing an Existing API

Overview

You can use a business flow to create a service integration task and encapsulate existing APIs into standard RESTful APIs for external use.

Prerequisites

If an existing API needs to be authenticated, obtain the authentication information in advance.

Procedure

  1. Log in to the HUAWEI CLOUD official website and go to the ROMA Connect home page.
  2. Click Business Flow.
  3. Click Business Flow Design in the upper right corner of the page and select a creation method. In this example, use Blank Template.
  4. Click Create Flow above Blank Template.
  5. Add a source node.
    1. Click Add or drag an integration application to the orchestration area.
    2. Click the Integration Application node for configuration. For details, see Integration Application. After the configuration is complete, click OK.
    3. Select Open API in the API Management area on the left and drag Open API to the integration application.
    • Before creating a service integration task, click All on the left and select Service integration from the drop-down list in the search box on the left to filter related components.
    • Only components filtered by using Service integration can be used for service integration tasks.
    1. Click the Open API node for configuration. For details, see Open API. After the configuration is complete, click OK.
  6. Add a destination node.
    1. Select HTTP Client in the API Management area on the left and drag HTTP Client to the integration application.
    2. Configure the HTTP Client node. For details, see HTTP Client. After the configuration is complete, click OK.
  7. Connect the business flow.
    1. Connect the Open API node to the HTTP Client node.
      Figure 1 Open API connection example
    2. Click in the upper right corner of the page and check whether configurations are correct.
      • If incorrect, reconfigure the nodes.
      • If correct, go to 9.
  8. Click Save in the upper right corner of the page to save the business flow configuration.
  9. Start a business flow.

    Click Start in the upper right corner of the page. If the task is started successfully, a success message will be displayed.

You can expose an API on a public network (if the environment can be connected to a public network) or an existing API of a business flow.