Hi,
I’m trying to use a key-value map in my application. I’ve tried creating apiproxy scoped maps and organization maps, but no matter what I seem to do, the values are never returned for the data. I’ve tried using the examples from the docs and I face the same issue. I asked a stackoverflow question on it here http://stackoverflow.com/questions/27850597/organization-level-key-value-map-operation-in-apigee but as of yet I’ve had no response. But basically I can use
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="Key-Value-Map-Operations-2" mapIdentifier="newkey">
<DisplayName>Key Value Map Operations 2</DisplayName>
<FaultRules/>
<Properties/>
<ExclusiveCache>false</ExclusiveCache>
<ExpiryTimeInSecs>-1</ExpiryTimeInSecs>
<InitialEntries>
<Entry>
<Key>
<Parameter>k1</Parameter>
</Key>
<Value>v1</Value>
</Entry>
<Entry>
<Key>
<Parameter>k2</Parameter>
</Key>
<Value>v3</Value>
<Value>v4</Value>
</Entry>
</InitialEntries>
<Get assignTo="mynewvar" index="1">
<Key>
<Parameter ref="k1"></Parameter>
</Key>
</Get>
<Scope>apiproxy</Scope>
</KeyValueMapOperations>
And mynewvar is always empty. If use a PUT field in the same policy it will return what I set in the PUT field. After this I created another policy just to try and return the key value map that was initialised here but it still doesn’t work e.g
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="Key-Value-Map-Operations-2" mapIdentifier="newkey">
<DisplayName>Key Value Map Operations 2</DisplayName>
<FaultRules/>
<Properties/>
<ExclusiveCache>false</ExclusiveCache>
<ExpiryTimeInSecs>-1</ExpiryTimeInSecs>
<Get assignTo="mynewnewvar" index="1">
<Key>
<Parameter ref="k1"></Parameter>
</Key>
</Get>
<Scope>apiproxy</Scope>
</KeyValueMapOperations>
I’m unsure as to what I’m doing wrong here and no matter what I try,nothing seems to work. If I use the tools in the docs to list all my keyvaluemaps they appear, but as soon as I use the tool to query for 1 of them, it returns a 404. I feel like this should be really easy but I’ve been banging my head against a brick wall for 2 days now