Add Custom Plugin
One of the key features of API7 Enterprise is its extensibility through Plugins. In addition to a wide range of existing plugins, API7 Enterprise 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 Enterprise processes requests in phases and the relevant plugin logics get executed in each phase during the routing of requests.
Prerequisites
- Obtain a user account with Super Admin role.
- Create plugin in Lua.
Steps
- Select Gateway Settings from the side navigation bar and then select Custom Plugin.
- Click Add Custom Plugin.
- Fill in the Add Custom Plugin form:
- Plugin Source Code File: upload the plugin file written in Lua.
- Plugin Catalog: catalog will be used to filter and search the plugin. For example choose
Traffic
. - Plugin Description: For example
Split the traffic with rules
. - Plugin Documentation Link: For example
https://docs.api7.ai/hub/traffic-split
. - Plugin Author: For example
Tom
.
- 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.