All Products
Search
Document Center

Data model

Last Updated: Mar 10, 2021

As a business staff, you can define API service’s requests and response as data models, and reuse the models to reduce fussy parameter settings. This function is used to define the parameters of HTTP API service. For other types of API services, you don’t have to define manually.

About this task

Currently, Mobile Gateway Service supports the following data model definition methods:

  • Visual edition: Add model parameters item by item.
  • Sample data edition: (Recommended) Parse the data model from the sample data.

Procedure

Complete the following steps to configure data model:

  1. On the Mobile Gateway Service homepage, select Data model tab to go to the data model list page.
    0
  2. Click Create data model to add a new data model, or click Details right to a specific data model in the list to edit the data model:
    1

    • Model name: The name of data model, which comprises letters, underscores, and numbers; and starts with a letter or an underscore.
    • Model description: Description of the data model.
    • Model parameters:
      • Parameter name: Required, the name of the parameter in a data model.
      • Type: Required, selectable types include String, Int, Long, Float, Double, Boolean, List and the data model that is already defined.
      • Default value: Optional, the default value of the parameter.
      • Description: Optional, the description of the parameter.
        Note: Map type is not supported currently.
  3. Click Submit to save the changes.