Tools, FAQ, Tutorials:
Policy Hierarchy and 'base' Statement
What are the relations among API policies defined at product level, API level, and operation level?
✍: FYIcenter.com
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:
<backend> </backend>
Assuming we have the following 3 policies defined:
Operation 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!
⇒ API Level Policy for All Operations
2018-03-10, ∼2601🔥, 0💬
Popular Posts:
What is EPUB 2.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 2.0 Metadata "dc:publisher" ...
Where to find EPUB Sample Files? Here is a list of EPUB sample files collected by FYIcenter.com team...
How to create the Hello-3.0.epub package? I have all required files to create Hello-3.0.epub. To cre...
How To Truncate an Array in PHP? If you want to remove a chunk of values from an array, you can use ...
Where to get the detailed description of the json_encode() Function in PHP? Here is the detailed des...