I’m trying to assign encrypted values from a KVM to a request’s query params, however, I get the following error message on the assign message policyL
{"fault":{"faultstring":"Unresolved variable : private.var1","detail":{"errorcode":"messaging.runtime.UnresolvedVariable"}}}
When I check the kvm policy I see it only assigned a timetaken variable.
My KVM policy:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="get-kvm" mapIdentifier="kvm">
<DisplayName>get kvm</DisplayName>
<Properties/>
<ExclusiveCache>false</ExclusiveCache>
<ExpiryTimeInSecs>300</ExpiryTimeInSecs>
<Get assignTo="private.var1" index="1">
<Key>
<Parameter>key1</Parameter>
</Key>
</Get>
<Get assignTo="private.var2" index="1">
<Key>
<Parameter>key2</Parameter>
</Key>
</Get>
<Scope>environment</Scope>
</KeyValueMapOperations>
My KVM:
{
"encrypted": true,
"entry": [
{
"name": "key2",
"value": "*****"
},
{
"name": "key1",
"value": "*****"
}
],
"name": "kvm"
}
My policy trying to use the values:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="assign-kvm">
<DisplayName>assign kvm</DisplayName>
<Properties/>
<Set>
<QueryParams>
<QueryParam name="var1">{private.var1}</QueryParam>
<QueryParam name="var2">{private.var2}</QueryParam>
</QueryParams>
</Set>
</AssignMessage>
I created the KVM by making an API call to https://api.enterprise.apigee.com/v1/organizations/{{org_name}}/keyvaluemaps/ with this JSON body:
{
"name" : "kvm",
"encrypted" : "true",
"entry" : [
{
"name" : "key1",
"value" : "value1"
},
{
"name" : "key2",
"value" : "value2"
}
]
}
