Create a parameter mapping
API Gateway provides parameter mapping, a feature that converts non-standard or inconsistent parameters in requests or responses to meet client or server-side specifications. This is useful for scenarios such as multi-department collaboration, standardizing parameters, and unifying error codes.
Procedure
Go to the API Gateway console. In the navigation pane on the left, choose API Publishing > Parameter Mapping.
On the parameter mapping list page, click Create Parameter Mapping in the upper-right corner.
On the Create Parameter Mapping page, select or enter the following information:
Parameter Mapping Name: Required. A unique name for the mapping rule. The name can contain Chinese characters, letters, underscores (_), plus signs (+), and hyphens (-). It must start with a letter or a Chinese character and be no more than 32 characters long.
Description: Optional. A description of the business purpose or scope of the parameter mapping. The description can be up to 64 characters long.
Mapping Type: Required. Specifies where the parameter mapping is applied. Select either Request Parameter Mapping or Response Parameter Mapping.
Configuration Template: Optional. Select an existing template from the drop-down menu to use as a base for the script configuration.
Script Configuration: Required. The script that defines the parameter mapping. For more information about the template configuration syntax, see Configure a parameter mapping template.
Confirm the information and click Create.
What to do next
After the parameter mapping is created, you can select this configuration when you create or edit an API to map request or response parameters.