Policy Hierarchy and 'base' Statement
What the relations among API policies defined at product level, API level, and operation level?
Azure API Management allows you to define policies at 3 levels:
The "base" Policy statement allows you to call the same policy block in the next upper level of the policy hierarchy. The "base" policy statement is a simple <base/> with no attributes and no content.
For example, the following "inbound" policy defined at the operation level will call the "inbound" policy defined at the operation level.
<inbound> <base /> ... operation own policy statement </inbound>
The following "backend" policy defined in an operation will not call the API "backend" policy. Azure API management will not forward this operation to any backend system, because is have no policy statement:
Assuming we have the following 3 policies defined:
Opetration inbound policy: <inbound> <base /> <!-- calling the API inbound policy <trace source="DEBUG">Hello from Operation Z!</trace> </inbound> API inbound policy: <inbound> <base /> <!-- calling the product inbound policy <trace source="DEBUG">Hello from API Y!</trace> </inbound> Product inbound policy: <inbound> <trace source="DEBUG">Hello from Product X!</trace> </inbound>
When Azure API management process the inbound request from a client system, it will produce DEBUG trace messages in order listed below:
Hello from Product X! Hello from API Y! Hello from Operation Z!
2017-09-23, 115👍, 0💬
What Is an HTML http-equiv "meta" Tag/Element? a http-equiv "meta" element is a special "meta" eleme...
Where to find tutorials on how to work with MySQL Database in PHP? A collection of tutorials to answ...
How To Remove Slashes on Submitted Input Values in PHP? By default, when input values are submitted ...
What is this Website about? dev.FYIcenter.com is a Website for software developer looking for softwa...
How To Return a Reference from a Function? in PHP? To return a reference from a function, you need t...