You can define API service requests and responses as data models. Reusing these models simplifies parameter settings. This feature is used to define parameters for HTTP API services. Other types of API services do not require manual definition.
About this task
Mobile Gateway Service (MGS) supports the following methods to define data models:
Visual editor: Add model parameters one by one.
Sample data editor: Parse a data model from sample data. This is the recommended method.
Procedure
To configure a data model, follow these steps:
On the MGS homepage, select the Data Model tab.
Click the Add Data Model button or the Details link in the list to add or edit a data model:
Model Name: The name of the model. It must start with a letter or an underscore (_) and can contain only letters, underscores, and digits.
Model Description: A description of the model.
Model Parameters:
Name: Required. The name of the parameter.
Type: Required. Valid values are
String,Int,Long,Float,Double,Boolean,List, and existing data models.Default Value: Optional. The default value.
Description: Optional. A description for the parameter.
NoteThe Map type is not currently supported.
Click Submit to save your changes.