Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The API Gateway has a default mediation flow for each API invocation. You can do additional custom mediation for the messages in the API Gateway by extending its mediation flow using a synapse mediation sequence. You can create a sequence either manually or using our , which you can extend by adding custom mediation sequences. You create a custom mediation sequences either manually or using WSO2 tooling support (i.e., WSO2 Developer Studio), and then engage it per API or globally to all APIs.  

Creating per-API extensions

The recommended way to engage a mediation extension sequence per API is to upload an XML file through the registry and then engage it using the API Publisher. The following tutorials show tutorial shows how to do this: Engage a Custom Mediation Flow.

Alternatively, you can name the mediation XML file in the pattern <API_NAME>:v<VERSION>--<DIRECTION> and save it directly in the following location:

...

You can also engage mediation extension sequences to all APIs in the API Manager at once. To do that, simply create the XML with the naming pattern WSO2AMpattern WSO2AM--Ext--<DIRECTION> and save it in the <APIM_HOME>/repository/deployment/server/synapse-configs/default/sequences directory.