How to retrieve KeyValue Map of an Organization in Java Script

Hi

I have created a Key Value Map in an Organization using Management API. Now I want to retrieve the value from Organization Map created above using key that is passed as query param in my request.

If I have to use Key Value Map Operations Policy, then how it will retrieve the value from the key and then I need to set the value in context so that it can be accessible to Java Script resource at the org level or it is available in variable which can be used while building the Target Endpoint.

Thanks

0 1 432
1 REPLY 1

Not applicable

Hi @GAURAV

You need to add the KeyValueMap operations policy and do a GET on the resource, assignTo a variable.

http://docs.apigee.com/api-services/reference/key-value-map-operations-policy

Same flow variable will be available for your javascript context e.g context.getVariable("variableA").