Mobile Gateway Service supports five API types. Register an API in the console to let mobile clients call your backend services through the gateway.
The registration steps differ by API type. Jump to the section for your type:
Prerequisites
Before you begin, ensure that you have:
An MPC API group (required before registering an MPC API)
-
A Dubbo or TR API group (required before registering a Dubbo or TR API)
Add an HTTP API
Log on to the mPaaS console. In the left navigation pane, click Mobile Gateway Service.
Choose Background connection > Mobile Gateway Service.
On the API Management tab, click Create API.
In the dialog box, select the HTTP API type.
-
In the operationType field, enter a value and click OK.
The
operationTypeis the unique identifier for the API service within the current environment and app.The
operationTypemust follow this format:Organization.ProductDomain.Product.Subproduct.Operation.
Add an MPC API
Mobile Gateway Service automatically pulls the MPC APIs from the selected group.
Log on to the mPaaS console. In the left navigation pane, click Mobile Gateway Service.
On the API Management tab, click Create API.
In the dialog box, select the MPC API type.
Select an API group, then select the service to register from the list of retrieved APIs.
Click OK.
Add a Dubbo API
Log on to the mPaaS console. In the left navigation pane, choose Background connection > Mobile Gateway Service.
On the API Management tab, click Create API.
In the dialog box, select the Dubbo API type.
Select an API group, then select the service to register from the list of retrieved APIs.
Click OK.
Add a TR API
Mobile Gateway Service automatically pulls the TR APIs from the selected group.
Log on to the mPaaS console. In the left navigation pane, choose Background connection > Mobile Gateway Service.
On the API Management tab, click Create API.
In the dialog box, select the TR API type.
Select an API group, then select the service to register from the list of retrieved APIs.
Click OK.
Add an HRPC API
Mobile Gateway Service automatically pulls the HRPC APIs from the selected group.
Log on to the mPaaS console. In the left navigation pane, choose Background connection > Mobile Gateway Service.
On the API Management tab, click Create API.
In the dialog box, select the HRPC API type.
Select an API group, then select the service to register from the list of retrieved APIs.
Click OK.
What's next
After registering an API, publish it to an environment so mobile clients can call it. You can also configure security policies and debug the API before release.