Key Value Map Operations policy is not worked as expected.

Not applicable

Key Value Map Operations policy is not worked as expected. The following values are not setting at run-time.

•urlencoding.requesturl.hashed: ed24e12820f2f900ae383b7cc4f2b31c402db1be •urlencoding.longurl.encoded: http://tinyurl.com/38lwmlr

•request.queryparam.url: http://tinyurl.com/38lwmlr

I'm not sure whether my build-ed proxy is correct or not. Attached my sample proxy.

Please help me on this. Thanks!

Solved Solved
1 7 374
1 ACCEPTED SOLUTION

It could be bug (or a desired behaviour?) not to show the key in trace...but those values must have been set. To your proxy, I add a RaiseFault to see if the value is set or not. It was being set correctly. Here is the attached updated proxy, which works. I have also added a GET to see if works.

Also this policy expects that you have set the value of "urlencoding.longurl.encoded". Since it's not set, I have commented that line in KeyValue 'PUT' policy adding only "request.queryparam.url" as the value.

Your API call would look like -

http://org-env.apigee.net/keyvalue?url=http://apigee.com

apiproxy-kvmap-rev2-2015-05-05.zip

View solution in original post

7 REPLIES 7

It could be bug (or a desired behaviour?) not to show the key in trace...but those values must have been set. To your proxy, I add a RaiseFault to see if the value is set or not. It was being set correctly. Here is the attached updated proxy, which works. I have also added a GET to see if works.

Also this policy expects that you have set the value of "urlencoding.longurl.encoded". Since it's not set, I have commented that line in KeyValue 'PUT' policy adding only "request.queryparam.url" as the value.

Your API call would look like -

http://org-env.apigee.net/keyvalue?url=http://apigee.com

apiproxy-kvmap-rev2-2015-05-05.zip

Former Community Member
Not applicable

Can you re-export your proxy? I am getting errors trying to import it. Are you setting the "urlencoding.requesturl.hashed" & "urlencoding.longurl.encoded" variables in your proxy somewhere? These are custom variables & need to be populated. Also from the trace image I do not see the value of "request.queryparam.url" flow variable. Are you sending this as part of the request query parameter? Can you share the proxy request URL that you using to test this?

The proxy bundle is not valid, it has deploy.sh file. You need to remove that file, create a zip and then try import.

Not applicable

Thanks Sudheendra. Now, I'm able to see the values at run-time in Trace.

I have a requirement like white-listing IP's for API's calls based on Client ID. For this requirement, I would like to fetch the IP addresses from the data base with respective client and maintain it through out the app. Is there any sample example to make the DB call? I don't think so we can call in proxy flow. We may need to verify in the target end. Please advice and it would be great if you have any sample. Thanks!

Former Community Member
Not applicable

Consider using Apigee Volos Connectors for connecting to databases, I believe Postgres & MySQL are supported today. Alternatively you can use the Java Callout policy along with the associated JDBC driver to connect to any database.

What database do you have? As @Prithpal Bhogill mentioned there are bunch of node.js based connectors available which you can use. If you are not comfortable with node.js, you could also write a light weight wrapper and call the wrapper from the API proxy.

Not applicable

Thanks Prithpal Bhogil and Sudheendra.

It is Oracle data base. Do you have any samples available in online for node.js or light weight wrapper integrating with APIGEE? Thanks!