Contact Us 1-800-596-4880

Reordering Policies

To execute certain policies before others, you can configure the order of execution of included and custom API-level policies. However, you cannot configure API-level policies to execute before automated policies.

For Flex Gateway running in Connected Mode, you reorder policies via API Manager. For Flex Gateway running in Local Mode you order policies via a PolicyBinding YAML resource.

You cannot configure the execution order of the Cross-Origin Resource Sharing (CORS) policy. The CORS policy executes before automated and API-level policies.

Flex Gateway in Connected Mode

To reorder policies in Flex Gateway running in Connected Mode:

  1. Go to Anypoint Platform > API Manager.

  2. In API Administration, click the name of the API instance whose policies you want to reorder.

  3. From the left navigation menu, click Policies.

  4. From the top of the list of the applied policies, click Reorder policies.

  5. From the Reorder Applied Policies section, use the up and down arrows to rearrange the order of policies.

  6. Click Apply order.

Flex Gateway in Local Mode

In Flex Gateway running in Local Mode, you configure policy ordering via a PolicyBinding YAML resource.

When defining a policy using a PolicyBinding YAML resource, edit the order parameter to match when you want the policy to execute. Ensure that you do not assign the same order number to different policies.

For information about Local Mode policy order, see the Declarative Configuration Reference Guide.