All Products
Search
Document Center

HTTP API

Last Updated: Apr 26, 2021

The quick start guides you to quickly register and publish an HTTP API service to be called by mobile client. The procedure falls into 5 steps:

  1. Register API group
  2. Register API service
  3. Configure API service
  4. Test API service
  5. Generate client SDK

Preparation

  1. Log into the console, click Products and Services > mPaaS to go to mPaaS console.
  2. Choose the correct workspace, click the name of the application to access API service.
  3. On the left navigation pane, click Mobile Gateway Service to go to mobile gateway configuration page.

Register API group

Only if you register the API group first, you can select the created API group in the system when you configure the created API later.

  1. Click API group tab to open API group list, then click Create API group.
  2. In the pop-up dialog box, enter or select the corresponding information.

    1

    • Type: Select HTTP.
    • API group: Required, it is the name of the business system which provides services. Start with a letter or underscore. Only letters, numbers, underscores, and hyphens are supported.
    • Host: Required, it is the business system’s HTTP/HTTPS URL.
    • Timeout period: Optional, it is the timeout period (in ms) for sending requests to the business system. It defaults to 3,000 ms.
  3. Click OK to submit.
    For more configuration of API group, see Configure HTTP group.

Register API service

  1. Click Manage APIs tab to open API list, then click Create API.
  2. In the pop-up dialog box, enter or select the API information.

    2

    • API type: Select HTTP.
    • operationType: Required, it is the unique identifier of the API service in the current workspace and application. The naming rule is organization.product domain.product.sub-product.operation.
  3. Click OK to submit.

Configure API service

  1. On the Manage APIs tab, click Configure in the operation column of API list to go to API configuration page.
  2. On the API configuration page, click Edit on the corresponding area to edit, and then click Save.

    Notes:
  3. Turn the switch on the top right corner to switch API service to On. Only the API services turned On can be called.

Test API service

See Test API for more information.

Generate client SDK

See Generate codes for more information.

Result

After completing the steps above, API service can be called by client.

For more detailed information of client development, see Client development guide: