I am trying to populate the 'endpoint' variable as below using assign message policy.
Trial A seems to work as expected. - I ran this request to test if the variable {url_deviceInfo} is getting populted or not.
Whereas TrialB throws an error - service unavailable.
Please let me know how to make Trial B work, {url_deviceInfo} is getting populated from KVM.
{url_deviceInfo} contains the hostname:port (eg: xyz.com:1234)
Trial A
<AssignVariable> <Name>endpoint2</Name> <Value>http://xyz.com/infinity/v1/subscriptions/{url_deviceInfo}/{req.partnerId}/</Value> </AssignVariable>
Trial B
<AssignVariable> <Name>endpoint2</Name> <Value>http://{url_deviceInfo}/infinity/v1/subscriptions/{req.partnerId}/</Value> </AssignVariable>
Did you try using the Template option?
<AssignVariable> <Name>endpoint2</Name> <Template>http://{url_deviceInfo}/infinity/v1/subscriptions/{req.partnerId}/</Template> </AssignVariable>
<Value> is used for the literal string value.
https://docs.apigee.com/api-platform/reference/message-template-intro
hi SIddharth,
We are running on private cloud 4.18.05.00 , I doubt if it is available in that version.
FYI: Trial A was run with <Value> as above, it worked. I have seen couple of cases and it works fine.
Thanks.
The template feature is available from 4.19.x I guess.
I am not sure if <Value> can take/process flow variables.
BTW have you tried with Javascript? context set/get variables should work.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |