Reputation: 750
I am wondering whether it is possible to specify something like Named value
but for each API separately?
So if I have, say foo-API
and bar-API
I can specify for each a named value-like variable, eg my-url
. So now when I create a global policy
<policies>
<inbound>
<base />
<send-request mode="new">
<set-url>{{my-url}}</set-url>
<set-method>POST</set-method>
<set-body>something</set-body>
</send-request>
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>
but send-request
will send request to the API specific URL (eg. different URL for DEV, TEST, PROD)
Upvotes: 0
Views: 1117
Reputation: 7810
Not possible. Named values are a global collection, the only workaround is to name them to be descriptive enough, i.e. prefix with API id.
Upvotes: 1