---
schema_version: "1"
id: 90a38fa447ffded8395246d7fceb45c003e757600bf1184a16a5334531fa84c4
title: Apply a Policy
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mule-gateway/policies-included-apply.md
canonical_url: https://docs.mulesoft.com/mule-gateway/policies-included-apply
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c64a13d9b11a780ee2b17c9b9370b82a986b56cef6b462733bbf7fb0ffe7d552
description: MuleSoft Documentation Site
latest: true
---
---
product: Mule Gateway
keywords: policy, endpoint
---

# Apply a Policy

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

For Mule Gateway, you apply included policies via **API Manager**. The following steps demonstrate
this.

You can apply a policy either to the entire API (default) or to specific methods and resources of an
API.

> [!NOTE] To apply a policy for Mule Gateway, a Mule application must first be deployed with a flow
> that uses an [HTTP Listener](https://docs.mulesoft.com/http-connector/1.10/http-listener-ref) component and is linked to
> the API through autodiscovery. The flow must use the HTTP Listener component specifically, not
> other connectors that use HTTP as an underlying transport.

To apply a policy:

1.  Go to **Anypoint Platform > API Manager**.

2.  In **API Administration** click the name of the API to which to apply a policy.

3.  From the left navigation menu, click **Policies**.

4.  Click **\+ Add policy**.

5.  Select the policy to apply.

6.  Configure the required configuration parameters.

    For policy configuration parameters, see
    [Included Policies Directory](https://docs.mulesoft.com/mule-gateway/policies-included-directory).

7.  Click **Apply**

## Upgrade a Policy Definition

To upgrade a policy in API Manager:

1.  Go to **Anypoint Platform > API Manager**.

2.  In **API Administration** click the name of the API with the policy to upgrade.

3.  From the left navigation menu, click **Policies**.

4.  Click the more options menu (![1%](/mulesoft/current/en-us/mule-gateway/_images/more-options-menu.png)) of the policy to upgrade, and
    then click **Edit configuration**.

5.  Select the **latest** version for **Policy version**.

6.  Click **Save**.

    > [!NOTE] You must manually check for implementation version updates only when upgrading the
    > **patch** version of a definition (for example, 1.0.0 to 1.0.1). For **minor** and **major**
    > version upgrades (for example, 1.0.0 to 1.1.0 or 1.0.0 t0 2.0.0), the implementation updates
    > automatically. To upgrade a policy implementation, see
    > [Upgrade a Policy Implementation](#upgrade-policy-implementation).

## Upgrade a Policy Implementation

To upgrade a policy implementation in API Manager:

1.  Go to **Anypoint Platform > API Manager**.

2.  In **API Administration** click the name of the API with the policy to upgrade.

3.  From the left navigation menu, click **Policies**.

4.  Click the more options menu (![1%](/mulesoft/current/en-us/mule-gateway/_images/more-options-menu.png)) of the policy to upgrade, and
    then click **Check for implementation updates**.

5.  If implementation updates are available, click **Update all**.

6.  Click **Ok**.
