The API Gateway has a default mediation flow, which you can extend by adding custom mediation sequences. You create a custom mediation sequences either sequence either manually or using WSO2 tooling support (i.e., WSO2 Developer Studio), and then engage it per API or globally to all APIs of a specific tenant.
Note |
---|
Please note that following mediators are not usable within custom sequences since they are not supported by API Gateway custom medications.
|
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 tutorial shows how to do this: Engage a Custom Change the Default Mediation Flow of API Requests.
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 all APIs of a specific tenant at once. To do that, simply create the XML with the naming pattern WSO2AM--Ext--<DIRECTION>
and save it in the <APIM_HOME>/repository/deployment/server/synapse-configs/default/sequences
directory.