Usages
- API Element Plugin is used as an extension of functions on top of the default API elements available in the API Builder.
- This plugin type must extend org.joget.api.model.ApiPluginAbstract abstract class.
POM file adjustments
Add the project dependency below:
<dependency> <groupId>org.joget.api</groupId> <artifactId>apibuilder_api</artifactId> <version>${project.version}</version> <scope>provided</scope> </dependency>
Abstract Class
org.joget.api.model.ApiPluginAbstract
- Under apibuilder_api module
- Extended org.joget.plugin.base.ExtDefaultPlugin. Please refer to Plugin Base Abstract Class and Interface.
- Implemented org.joget.api.model.ApiPlugin.
- A base abstract class to develop a custom API Element Plugin.
Abstract Methods
authenticate
public boolean authenticate(HttpServletRequest request, HttpServletResponse response);
Used to authenticate API calls on an existing API document.
Parameters:
request - the http request information
response - the http response to write
Overridable Methods
getTagDesc
public String getTagDesc();
Used to authenticate API calls on an existing API document.
Default will return the value found in getLabel() method.
Plugin Properties Options
- Please refer to Plugin Properties Options for more information.
Sample Plugins
- Basic Current User API - basic-current-user.zip
- Sample API with property options - apibuilder_sample_plugin.zip