Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to dynamically retrieve variables from ServiceCallOut policy to make logging into splunk.

Not applicable
  1. is there a way to get dynamically to get {policy-name} of serviceCallout ? otherwise, I have to do hardcode of policy-name of servicecallout.
  2. is there any policy to retrieve serviceCallOut information for logging purpose ?

We have mostly used Servicecallout policy for 4-5 backend calls. How can we dynamically retrieve the request, request-form-params, request-queryparams, response payload in serviceCallout. That solution we can implement for other API proxies as well, once it worked for one API proxy. I have tried with servicecallout.{policy-name}.target.url, as mentioned in https://docs.apigee.com/api-services/reference/variables-reference but it returns null. Don't understand why it is not working or how to use it while doing the logging.

0 3 542
3 REPLIES 3