Updated on 2023-03-09 GMT+08:00

Creating API Gateway Data Connections

API Gateway is a high-performance, high-availability, and secure API hosting service provided by cloud for enterprise developers and partners.

Before establishing a data connection to API Gateway, ensure that the following condition is met:

  • You have obtained an AppKey and AppSecret.

Creating API Gateway Data Connections

  1. Log in to the DLV console.
  2. On the Data page, click the workspace drop-down list at the top of the page, select the workspace to be accessed, and click New Data Connection.

    Figure 1 Creating a data connection

  3. In the New Data Connection dialog box, set Data Source Type to API Gateway and set the related parameters.

    Figure 2 API Gateway
    Table 1 APIG data connection parameters

    Parameter

    Description

    Name

    Name of the data connection. Must contain 1 to 32 characters and contain only letters, digits, hyphens (-), and underscores (_).

    AppKey

    Enter the AppKey. If the authentication mode of APIG is APP, enter an AppKey. If another authentication mode is used, enter any character to ensure that the text box is not blank.

    AppSecret

    Enter the AppSecret. If the authentication mode of APIG is APP, enter an AppSecret value. If another authentication mode is used, enter any character to ensure that the text box is not blank.

  4. Click OK.

Using APIG Data Sources

  1. Log in to the DLV console.
  2. On the Screens page, locate the screen to be edited and click on the screen. The screen development page is displayed.

    Figure 3 Editing a screen

  3. Select a component, for example, a bar chart. The component is displayed in the canvas. Click the component and then the Data panel on the right of the page.
  4. Set the following parameters on the Data panel:

    • Data Source Type: Set this parameter to API Gateway.
    • Data Connection: Select an API Gateway data connection from Data Connection.
    • Request Mode: Select the request mode of API Gateway.
    • URL: Enter the request URL in the editing area.
    Figure 4 Adding an API Gateway data connection

  5. Click Preview Response Result to view the data response result.