Add Custom Plugin
One of the key features of API7 Gateway is its extensibility through plugins. In addition to a wide range of existing plugins, API7 Gateway also allows you to build custom plugins to add extra functionalities and manage API traffic with custom flow. Oftentimes, you use Lua programming language to implement new plugins. API7 Gateway processes requests in phases and the relevant plugin logics get executed in each phase during the routing of requests.
Prerequisites
Add Custom Plugin
- Select Gateway Settings from the side navigation bar, then select Custom Plugin.
- Click Add Custom Plugin.
- From the add custom plugin dialog box, do the following:
- Plugin Source Code File: Upload the source code of your custom plugin.
- Plugin Catalog: Select the catalog for the plugin, for example,
General
. - Plugin Description: Fill out the plugin description, for example,
Replace the response body
. - Plugin Documentation Link: Add the URL to your plugin documentation.
- Plugin Author: Fill out the name of the plugin author.
- Click Add.
- Now your custom plugin is added to the plugin list. It can be selected by global rules of services/routes/consumers/plugins in the Enable Plugin dialog box.
Below is an interactive demo that provides a hands-on introduction to adding custom services. You will gain a better understanding of how to use it in API7 Enterprise by clicking and following the steps.