How to write an mapIdentifier tag in key value map policy?

Not applicable

Hello everyone , can any one please tell me how to write an mapIdentifier tag in key value map policy, This may be a silly question I know but I am new to this.

Solved Solved
0 2 542
1 ACCEPTED SOLUTION

Former Community Member
Not applicable

Hi @SUNIL KUMAR MORE, its fairly simple. Here is a link to the documentation for the KVM (Key Value Map) policy. The "mapIdentifier" is specified as an attribute:

<KeyValueMapOperations name="putUrl" mapIdentifier="urlMapper">
   <Scope>apiproxy</Scope>
   <Put override="true">
      <Key>
         <Parameter ref="urlencoding.requesturl.hashed"/>
      </Key>
      <Value ref="urlencoding.longurl.encoded"/>
      <Value ref="request.queryparam.url"/>
   </Put>
</KeyValueMapOperations>

In the above example the KVM policy refers to a map identified by "urlMapper". Hope that helps.

View solution in original post

2 REPLIES 2

Former Community Member
Not applicable

Hi @SUNIL KUMAR MORE, its fairly simple. Here is a link to the documentation for the KVM (Key Value Map) policy. The "mapIdentifier" is specified as an attribute:

<KeyValueMapOperations name="putUrl" mapIdentifier="urlMapper">
   <Scope>apiproxy</Scope>
   <Put override="true">
      <Key>
         <Parameter ref="urlencoding.requesturl.hashed"/>
      </Key>
      <Value ref="urlencoding.longurl.encoded"/>
      <Value ref="request.queryparam.url"/>
   </Put>
</KeyValueMapOperations>

In the above example the KVM policy refers to a map identified by "urlMapper". Hope that helps.

Hi @SUNIL KUMAR MORE if you are looking for passing a variable name to the mapIdentifier, that is currently not supported. For a general usage, you can refer to the example above.