Azure API Policy XML Document Structure

Q

What is the XML Document Structure of an Azure API service operation?

✍: FYIcenter.com

A

Azure API Policy XML Document contains 4 policy blocks:

  • "inbound" - Policy sub element to provide policy statements that controls the generation of the inbound HTTP request to be delivered to the backend service.
  • "backend" - Policy sub element to provide policy statements that controls how to call the backend service.
  • "outbound" - Policy sub element to provide policy statements that controls the generation of the outbound HTTP response to be delivered to the client system.
  • "on-error" - Policy sub element to provide policy statements that controls how to handle errors resulted from the backend service call.

Here is an example of a policy XML document, which uses the "base" policy statement to keep Azure default behavior in all cases:

<policies>
  <inbound>
    <base />
  </inbound>
  <backend>
    <base />
  </backend>
  <outbound>
    <base />
  </outbound>
  <on-error>
    <base />
  </on-error>
</policies>

 

Policy Hierarchy and 'base' Statement

Edit API Operation Policy

Using Azure API Policy

⇑⇑ Microsoft Azure API Management Tutorials

2018-03-10, 1846🔥, 0💬