Include fragment

APPLIES TO: All API Management tiers

The include-fragment policy inserts the contents of a previously created policy fragment in the policy definition. A policy fragment is a centrally managed, reusable XML policy snippet that can be included in policy definitions in your API Management instance.

The policy inserts the policy fragment as-is at the location you select in the policy definition.


Set the policy's elements and child elements in the order provided in the policy statement. Learn more about how to set or edit API Management policies.

Policy statement

<include-fragment fragment-id="fragment" />


Attribute Description Required Default
fragment-id A string. Specifies the identifier (name) of a policy fragment created in the API Management instance. Policy expressions aren't allowed. Yes N/A



In the following example, the policy fragment named myFragment is added in the inbound section of a policy definition.

    <include-fragment fragment-id="myFragment" />
    <base />

For more information about working with policies, see: