Message Part Identifier allows policies to identify the part of the message from where the values required for various policies needs to be populated from. For example, to perform Response Cache based on a query parameter, the key in the policy can be configured as Query Parameter such as ID.
Figure 1: Dialog box to choose Identifier Type
Type
Various types of message parts are:
- Context Variable
- Parameter
- Header
- Constant
Each Message Part type is explained below.
Context Variable
The name can be one of the Context variables defined in Context Variables section or any variable defined using the Assign Variables Policy.
Figure 2: Context Variable Identifier type with list of Variable names
Parameter
The name of the query parameter which needs to be used as the identifier.
Figure 3: Parameter Identifier type with the corresponding attributes
Header
The name of the Header which needs to be used as the identifier.
Figure 4: Header Identifier type with the corresponding attributes
Constant
This option can be used to define constants as variable. For Example, value of weight in Quota Policy.
Figure 5: Constant Identifier type with the corresponding attributes
Default Value
The default value is used when the identifier specified is not present in the incoming message. For example, the variable api.product.name will not be present unless Verify API Key or OAuth Token End Point is used.