Updated on 2023-07-26 GMT+08:00

Connecting to an API Data Source

Overview

ROMA Connect can use API as a data source for data integration tasks. Before using the API data source, you need to connect it to ROMA Connect.

Prerequisites

Each connected data source must belong to an integration application. Before connecting a data source, ensure that an integration application is available. Otherwise, create an integration application first.

Procedure

  1. Log in to the ROMA Connect console. On the Instances page, click View Console next to a specific instance.
  2. In the navigation pane on the left, choose Data Sources. In the upper right corner of the page, click Access Data Source.
  3. On the Default tab page, select API and click Next.
  4. Configure the data source connection information.
    Table 1 Data source connection information

    Parameter

    Description

    Name

    Enter a data source name. It is recommended that you enter a name based on naming rules to facilitate search.

    Integration Application

    Select the integration application to which the data source belongs.

    Description

    Enter the descriptive information.

    Address

    Enter the request URL of the API, for example, https://example.com/test.

    Request Mode

    Select the request method of the API.

    Authentication Mode

    Select the authentication method of the API.

    • None: No authentication is required. Any user can call the API.
    • Basic Auth: The username and password are used for authentication. APIs can be called only after the authentication is successful.

      If you select Basic Auth, you also need to set Username and Password for authentication.

    • AppKey Auth: The AppKey and AppSecret are used to sign the request. The API can be called only after the signature verification is successful.

      If you select AppKey Auth, you also need to select an app authentication type. The app authentication type can be:

      • Default: The AppKey and AppSecret are used to sign the request. The API can be called only after the signature verification is successful. This mode is used by default for APIs of APIC.
      • Secret: The AppKey and AppSecret are used to authenticate the request.
      • Jwt: The AppKey, AppSecret, and the API calling timestamp are used to generate signature information and authenticate the request.
    • OAuth2.0: User information is obtained through open APIs under permission. The request header carries the authorization information. The API for obtaining the secret information in the header can be called only after being verified.

      If you select OAuth2.0 authentication, you also need to select the authorization type and enter the access token URL, client ID, client key, and scope.

    • Secret: A password is used for authentication. The request header carries the secret information. The API for obtaining the secret information in the header can be called only after being verified.

      If you select secret authorization, you need to enter Secret.

    • MD5: The verification information signature is obtained after the body parameters are encrypted. The request body carries the signature information. The API for obtaining the signature information can be called only after being verified.

      If you select secret authorization, you need to enter Secret.

    • HMAC: The verification information signature is obtained after the body parameters are encrypted. The request body carries the signature information. The API for obtaining the signature information can be called only after being verified.

      If you select secret authorization, you need to enter Secret.

    • Other authentication modes: These authentication modes are customized by business partners, such as Key Top Auth, Hik Vision Auth, and li He Auth. Set the authentication parameters based on the customized authentication mode you select.

    The following is an example of connecting to an API released by ROMA Connect. The API authentication mode is App authentication.

    Set the authentication mode to APPKey Auth, and retain Default for the APP authentication type. AppKey and AppSecret are the key and secret of the integration application authorized by the API.

    Figure 1 API data source configuration example
  5. Click Check Connectivity to check the connectivity between ROMA Connect and the data source.
    • If the test result is Data source connected successfully, click Create.
    • If the test result is Failed to connect to the data source, check whether the address, request mode, authentication mode, AppKey, and AppSecret are correct, and whether the API can be accessed. Then, click Recheck until the connection is successful.
  6. Click Create.