All Products
Search
Document Center

API groups

Last Updated: Apr 02, 2021

API group is the group to which the API belongs, which can be a specific system name, module name, or abstract identifier. Currently, The following types of API groups can be created in the mobile gateway:

  • HTTP: HTTP services in RESTful style.
  • Dubbo: Apache Dubbo service, for private cloud only.
  • TR: Ant Financial RPC framework, for private cloud only.

Create API groups

  1. Select API group tab to go to the API group list page.
  2. click Create API group, and then fill out the form in the pop-up dialog box.

    • Common configuration items:
      • Group type: Required, it supports HTTP, Dubbo, and TR. The latter two types are only available for private cloud.
      • API group: Required, it is the name of the business system which provides services.
      • Timeout period: Optional, it is the timeout period (in ms) for sending requests to the business system. It defaults to 3,000 ms.
    • Other configuration items:
      • Host: Required for HTTP service, it is the business system’s HTTP/HTTPS URL.
      • Registry: Required for Dubbo services. It supports ZK cluster or direct connection.
      • Direct connection address: Optional for TR, to perform direct connection.
  3. After you fill out the form, click OK to submit.

Configure groups

Complete the API group configuration accordingly for different types of groups:

Configure HTTP group

In the API group list, find the HTTP type group, click Details in the Operation column of the API group to go to the API group details page. In the details page, click Modify on the upper-right corner to configure the group. The configuration items of HTTP group are as follows:

  • Host: The URL address of HTTP services.
  • Timeout period: In milliseconds, 3,000 ms by default.
  • Verify signature: Enable it if the business system needs to verify the caller’s identity. See instructions on backend signature verification for how to verify.
  • Encryption algorithm: The algorithm for generating signature. Public cloud supports MD5 and RSA algorithms, while private cloud supports MD5, RSA, and MOBILEGW.
  • Key: The key used in backend signature, customizable.
  • Key content: The value used in backend signature.
    • When the signing algorithm is MD5, the content is customizable.
    • when the signing algorithm is RSA, the content is the public key of the mobile gateway.
    • When the signing algorithm is MOBILEGW, apply to the operations stuff for the content.

Configure Dubbo group

Note: Dubbo group is only available in private cloud.
In the API group list, find the Dubbo type group, click Details in the Operation column of the API group to go to the API group details page. In the details page, click Modify on the upper-right corner to configure the group. The configuration items of Dubbo group are as follows:

  • Registration center: The address of the configuration center for Dubbo services.
  • Timeout period: In milliseconds, 3,000 ms by default.

Configure TR group

Note: TR group is only available in private cloud.
In the API group list, find the TR type group, click Details in the Operation column of the API group to go to the API group details page. In the details page, click Modify on the upper-right corner to configure the group. The configuration items of TR group are as follows:

  • Direct connection address: The direct connection address of TR services, consist of IP and port. The port defaults to 12200 if not specified.
  • Timeout period: In milliseconds, 3,000 ms by default.